code: private function getUnionMemberTypeNodes(UnionType $union, $typeName)
      {
          if ($union->astNode && $union->astNode->types) {
              return array_filter(
                  $union->astNode->types,
                  static function (NamedTypeNode $value) use ($typeName) {
                      return $value->name->value === $typeName;
                  }
              );
          }
  
          return $union->astNode ?
              $union->astNode->types : null;
      }
docs: @param string $typeName
  
  @return NamedTypeNode[]