<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _FindCodeObjectsReferents(module, start_objects, visit_recorder):
 """Looks for all the code objects referenced by objects in start_objects. The traversal implemented by this function is a shallow one. In other words if the reference chain is a -> b -> co1 -> c -> co2, this function will return [co1] only. The traversal is implemented with BFS. The maximum depth is limited to avoid touching all the objects in the process. Each object is only visited once using visit_recorder. Args: module: module in which we are looking for code objects. start_objects: initial set of objects for the BFS traversal. visit_recorder: instance of _VisitRecorder class to ensure each object is visited at most once. Returns: List of code objects. """

  def CheckIgnoreCodeObject(code_object):
    """Checks if the code object can be ignored.

    Code objects that are not implemented in the module, or are from a lambda or
    generator expression can be ignored.

    If the module was precompiled, the code object may point to .py file, while
    the module says that it originated from .pyc file. We just strip extension
    altogether to work around it.

    Args:
      code_object: code object that we want to check against module.

    Returns:
      True if the code object can be ignored, False otherwise.
    """
    if code_object.co_name in ('<lambda>', '<genexpr>'):
      return True

    code_object_file = os.path.splitext(code_object.co_filename)[0]
    module_file = os.path.splitext(module.__file__)[0]

    # The simple case.
    if code_object_file == module_file:
      return False

    return True

  def CheckIgnoreClass(cls):
    """Returns True if the class is definitely not coming from "module"."""
    cls_module = sys.modules.get(cls.__module__)
    if not cls_module:
      return False  # We can't tell for sure, so explore this class.

    return (
        cls_module is not module and
        getattr(cls_module, '__file__', None) != module.__file__)

  code_objects = set()
  current = start_objects
  for obj in current:
    visit_recorder.Record(current)

  depth = 0
  while current and depth < _MAX_REFERENTS_BFS_DEPTH:
    new_current = []
    for current_obj in current:
      referents = gc.get_referents(current_obj)
      if (current_obj is not module.__dict__ and
          len(referents) > _MAX_OBJECT_REFERENTS):
        continue

      for obj in referents:
        if isinstance(obj, _BFS_IGNORE_TYPES) or not visit_recorder.Record(obj):
          continue

        if isinstance(obj, types.CodeType) and CheckIgnoreCodeObject(obj):
          continue

        if isinstance(obj, six.class_types) and CheckIgnoreClass(obj):
          continue

        if isinstance(obj, types.CodeType):
          code_objects.add(obj)
        else:
          new_current.append(obj)

    current = new_current
    depth += 1

  return code_objects