code: def parse_field_choice(field):
      """Return a field association object for a given field type string.
  
      Parameters
      ----------
      field : str, FieldAssociation
          Name of the field (e.g, ``'cell'``, ``'field'``, ``'point'``,
          ``'row'``).
  
      Returns
      -------
      pyvista.FieldAssociation
          Field association.
  
      """
      if isinstance(field, str):
          field = field.strip().lower()
          if field in ["cell", "c", "cells"]:
              field = FieldAssociation.CELL
          elif field in ["point", "p", "points"]:
              field = FieldAssociation.POINT
          elif field in ["field", "f", "fields"]:
              field = FieldAssociation.NONE
          elif field in ["row", "r"]:
              field = FieldAssociation.ROW
          else:
              raise ValueError(f"Data field ({field}) not supported.")
      elif isinstance(field, FieldAssociation):
          pass
      else:
          raise TypeError(f"Data field ({field}) not supported.")
      return field
  
imports: import collections.abc
  import enum
  from itertools import product
  from typing import Optional, Tuple, Union
  import numpy
  import pyvista
  from pyvista.core import _vtk_core
  from pyvista.core._typing_core import Matrix, NumpyArray, TransformLike, Vector
  from pyvista.core.errors import AmbiguousDataError, MissingDataError
label_desc: Use image node_id 1 for calling a global function with example usage: parse_field_choice(field) and returns: field