/**
  * Create attribute options
  *
  * @param AttributeInterface $attribute
  * @param array              $data
  */
 protected function addOptions(AttributeInterface $attribute, $data)
 {
     if (count($data['options']) === 1) {
         $attribute->setBackendType('option');
     } elseif (count($data['options']) > 1) {
         $attribute->setBackendType('option');
     }
     foreach ($data['options'] as $code => $values) {
         $attributeOption = new AttributeOption();
         $attributeOption->setCode($code);
         foreach ($values as $locale => $value) {
             $optionValue = new AttributeOptionValue();
             $optionValue->setLocale($locale);
             $optionValue->setValue($value);
             $attributeOption->addOptionValue($optionValue);
         }
         $attribute->addOption($attributeOption);
     }
 }