def _CollectTypeChecks(function, parent_type_check_dict, stack_location,
                      self_name):
  """Collect all type checks for this function."""
  type_check_dict = dict(parent_type_check_dict)
  type_check_dict.update(_ParseDocstring(function))

  # Convert any potential string based checks into python instances.
  for key, value in type_check_dict.items():
    if isinstance(value, str):
      type_check_dict[key] = _ParseTypeCheckString(value, stack_location + 1,
                                                  self_name)

  return type_check_dict
Collect all type checks for this function.