parameters: (diffs, side, path)
return_statement: return None
docstring: Given a side & path, find the index in the diff for it.
  
      Returns None if there's no diff for the (side, path) pair.
docstring_summary: Given a side & path, find the index in the diff for it.
docstring_tokens: Given a side & path find the index in the diff for it .
function: def find_diff_index(diffs, side, path):
      """Given a side & path, find the index in the diff for it.
  
      Returns None if there's no diff for the (side, path) pair.
      """
      assert side in ('a', 'b')
  
      def norm(p):
          if p == '':
              return ''
          return os.path.normpath(p)
  
      path = norm(path)
      for idx, diff in enumerate(diffs):
          if side == 'a' and norm(diff.a) == path:
              return idx
          if side == 'b' and norm(diff.b) == path:
              return idx
      return None
function_tokens: def find_diff_index ( diffs , side , path ) : assert side in ( 'a' , 'b' ) def norm ( p ) : if p == '' : return '' return os . path . normpath ( p ) path = norm ( path ) for idx , diff in enumerate ( diffs ) : if side == 'a' and norm ( diff . a ) == path : return idx if side == 'b' and norm ( diff . b ) == path : return idx return None