original_docstring: Given a fpath on the "camera", determine if present in the survey of the library.
          I could just return True/False, but returning the library fpath/None might be more interesting.
  
          filecmp.cmp has a fast sanity check mode, and a full test.
      
docstring: Given a fpath on the "camera", determine if present in the survey of the library.
  I could just return True/False, but returning the library fpath/None might be more interesting.
  
  filecmp.cmp has a fast sanity check mode, and a full test.
docstring_tokens: Given a fpath on the " camera " determine if present in the survey of the library . I could just return True / False but returning the library fpath / None might be more interesting . filecmp . cmp has a fast sanity check mode and a full test .
code: def locate(tgt_fpath, survey):
      """Given a fpath on the "camera", determine if present in the survey of the library.
          I could just return True/False, but returning the library fpath/None might be more interesting.
  
          filecmp.cmp has a fast sanity check mode, and a full test.
      """
      flen = os.stat(tgt_fpath).st_size
      fpaths = survey.get(flen, ())
      if not fpaths:
          return None
  
      for fbase_path in fpaths:
          # print('  '*5, tgt_fpath, fbase_path)
          if not filecmp.cmp(tgt_fpath, fbase_path, shallow=True):
              continue        # early reject, try other candidates
          if filecmp.cmp(tgt_fpath, fbase_path, shallow=False):
              # identically equal
              return fbase_path
  
      return None
code_tokens: def locate ( tgt_fpath , survey ) : flen = os . stat ( tgt_fpath ) . st_size fpaths = survey . get ( flen , ( ) ) if not fpaths : return None for fbase_path in fpaths : if not filecmp . cmp ( tgt_fpath , fbase_path , shallow = True ) : continue if filecmp . cmp ( tgt_fpath , fbase_path , shallow = False ) : return fbase_path return None
short_docstring: Given a fpath on the "camera", determine if present in the survey of the library.
short_docstring_tokens: Given a fpath on the " camera " determine if present in the survey of the library .
comment: """Given a fpath on the "camera", determine if present in the survey of the library.
          I could just return True/False, but returning the library fpath/None might be more interesting.
  
          filecmp.cmp has a fast sanity check mode, and a full test.
      """$SEP$# print('  '*5, tgt_fpath, fbase_path)$SEP$# early reject, try other candidates$SEP$# identically equal