code: protected function createAttributeInstance(ModelInterface $model = null)
      {
          if (null === $model) {
              return null;
          }
  
          return $this->attributeFactory->createAttribute(
              $model->getPropertiesAsArray(),
              $this->getMetaModelByModelPid($model)
          );
      }
docs: Create an attribute from the passed data.
  
  @param ModelInterface|null $model The information.
  
  @return IAttribute|null
  
  @throws \InvalidArgumentException When the MetaModel could not be retrieved.