def _check_and_convert_legacy_input_config_key(key):
  """Checks key and converts legacy input config update to specific update.

  Args:
    key: string indicates the target of update operation.

  Returns:
    is_valid_input_config_key: A boolean indicating whether the input key is to
      update input config(s).
    key_name: 'eval_input_configs' or 'train_input_config' string if
      is_valid_input_config_key is true. None if is_valid_input_config_key is
      false.
    input_name: always returns None since legacy input config key never
      specifies the target input config. Keeping this output only to match the
      output form defined for input config update.
    field_name: the field name in input config. `key` itself if
      is_valid_input_config_key is false.
  """
  key_name = None
  input_name = None
  field_name = key
  is_valid_input_config_key = True
  if field_name == "train_shuffle":
    key_name = "train_input_config"
    field_name = "shuffle"
  elif field_name == "eval_shuffle":
    key_name = "eval_input_configs"
    field_name = "shuffle"
  elif field_name == "train_input_path":
    key_name = "train_input_config"
    field_name = "input_path"
  elif field_name == "eval_input_path":
    key_name = "eval_input_configs"
    field_name = "input_path"
  elif field_name == "append_train_input_path":
    key_name = "train_input_config"
    field_name = "input_path"
  elif field_name == "append_eval_input_path":
    key_name = "eval_input_configs"
    field_name = "input_path"
  else:
    is_valid_input_config_key = False

  return is_valid_input_config_key, key_name, input_name, field_name
Checks key and converts legacy input config update to specific update.

  Args:
    key: string indicates the target of update operation.

  Returns:
    is_valid_input_config_key: A boolean indicating whether the input key is to
      update input config(s).
    key_name: 'eval_input_configs' or 'train_input_config' string if
      is_valid_input_config_key is true. None if is_valid_input_config_key is
      false.
    input_name: always returns None since legacy input config key never
      specifies the target input config. Keeping this output only to match the
      output form defined for input config update.
    field_name: the field name in input config. `key` itself if
      is_valid_input_config_key is false.
  
inference_api/src/main/object_detection/utils/config_util.py