parameters: (pairs)
docstring: Get all the pixel pairs whose gradient involves an unknown pixel.
          Input should be a set or dictionary of pixel pair tuples
docstring_summary: Get all the pixel pairs whose gradient involves an unknown pixel.
          Input should be a set or dictionary of pixel pair tuples
docstring_tokens: Get all the pixel pairs whose gradient involves an unknown pixel . Input should be a set or dictionary of pixel pair tuples
function: def involvedpairs(pairs):
      ''' Get all the pixel pairs whose gradient involves an unknown pixel.
          Input should be a set or dictionary of pixel pair tuples
      '''
      for pair in pairs: #loop through unknown pixels
          yield pair
  
          left = (pair[0],pair[1]-1)
          if left[1] >= 0 and left not in pairs: #if 'left' in picture, and not already unknown
              yield left
  
          top = (pair[0]-1,pair[1])
          topright = (pair[0]-1,pair[1]+1)
          #if not on top boundary, top is fixed, and top not already touched by upper right pixel
          if pair[0] > 0 and top not in pairs and topright not in pairs:
              yield top
function_tokens: def involvedpairs ( pairs ) : for pair in pairs : #loop through unknown pixels yield pair left = ( pair [ 0 ] , pair [ 1 ] - 1 ) if left [ 1 ] >= 0 and left not in pairs : #if 'left' in picture, and not already unknown yield left top = ( pair [ 0 ] - 1 , pair [ 1 ] ) topright = ( pair [ 0 ] - 1 , pair [ 1 ] + 1 ) #if not on top boundary, top is fixed, and top not already touched by upper right pixel if pair [ 0 ] > 0 and top not in pairs and topright not in pairs : yield top