code: def check_field_name(
      cls, field: Union[str, RecordSortField]
  ) -> Union[str, RecordSortField]:
      try:
          return RecordSortField(field)
      except ValueError:
          if field.startswith("metadata."):
              return field
          else:
              raise ValueError(
                  f"{field} is not a valid field name. Supported fields are: {RecordSortField} or metadata.*"
              )
  
imports: import warnings
  from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Tuple, Union
  from uuid import UUID
  from argilla.client.feedback.schemas.enums import RecordSortField, ResponseStatus, SortOrder
  from argilla.pydantic_v1 import BaseModel, Extra, Field, PrivateAttr, StrictInt, StrictStr, conint, validator
label_desc: Use image node_id 1 for calling the SortBy obj's underlying member method code with example usage: obj.check_field_name(cls, field) and returns: RecordSortField, field