code: def GetCodeObjectAtLine(module, line):
    
    if not hasattr(module, '__file__'):
      return (False, (None, None))
  
    prev_line = 0
    next_line = six.MAXSIZE
  
    for code_object in _GetModuleCodeObjects(module):
      for co_line_number in _GetLineNumbers(code_object):
        if co_line_number == line:
          return (True, code_object)
        elif co_line_number < line:
          prev_line = max(prev_line, co_line_number)
        elif co_line_number > line:
          next_line = min(next_line, co_line_number)
          break
  
    prev_line = None if prev_line == 0 else prev_line
    next_line = None if next_line == six.MAXSIZE else next_line
    return (False, (prev_line, next_line))
docs: Searches for a code object at the specified line in the specified module.
  
    Args:
      module: module to explore.
      line: 1-based line number of the statement.
  
    Returns:
      (True, Code object) on success or (False, (prev_line, next_line)) on
      failure, where prev_line and next_line are the closest lines with code above
      and below the specified line, or None if they do not exist.