/**
  * @param \Magento\Catalog\Api\Data\ProductAttributeInterface $attribute
  * @return bool
  */
 public function isAttributeApplicable($attribute)
 {
     $types = [\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE, \Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL, \Magento\ConfigurableProduct\Model\Product\Type\Configurable::TYPE_CODE];
     return !$attribute->getApplyTo() || count(array_diff($types, $attribute->getApplyTo())) === 0;
 }