def get_adapter(function_string):
  """Maps a string to a Python function.

  Args:
    function_string: String name of the adapter function.

  Returns:
    A Python function corresponding to the adatper function.
    `function_string` is None or empty, will return None.
    If `function_string` is not a string, it will return `function_string`.

  Raises:
    ValueError: The `function_string` does not correspond to a known
      adapter.
  """

  # We assume that anything that"s not a string is already an adapter
  # function, so we just return it.
  if not isinstance(function_string, six.string_types):
    return function_string

  if not function_string:
    return None

  fn = function_string.lower()
  if fn == "feedforward_adapter":
    return feedforward_adapter
  else:
    raise ValueError("Unsupported adapters: %s" % fn)
Maps a string to a Python function.

  Args:
    function_string: String name of the adapter function.

  Returns:
    A Python function corresponding to the adatper function.
    `function_string` is None or empty, will return None.
    If `function_string` is not a string, it will return `function_string`.

  Raises:
    ValueError: The `function_string` does not correspond to a known
      adapter.
  
modeling.py