public static function getNodeFieldValue(
    EntityInterface $node,
    string $fieldName,
    int $index = -1,
    string $keyname = 'value'
  ) {
    $field_instance = static::getNodeField($node, $fieldName);
    $field_instance_value = $field_instance->getValue();

    if ($index > -1) {
      $field_instance_value = $field_instance_value[$index][$keyname];
    }

    return $field_instance_value;
  }