src/Utils/EntityDrupalWrapper.php
public function getFieldInstance($field_name)
    {
        $field_name = $this->getFieldNameByLocator($field_name);

        return empty($this->instances[$field_name]) ? [] : $this->instances[$field_name];
    }
public function getFieldInstance($field_name)
    {
        $field_name = $this->getFieldNameByLocator($field_name);

        return empty($this->instances[$field_name]) ? [] : $this->instances[$field_name];
    }
@param string $field_name
Machine name or label of a field.

@return array[]
Drupal field definition.