original_docstring:  Find the points afterwards(aft) and forwards(fwd) that are closest
          to x_hinge. Retuns dictionaries aft and fwd, each with keys x and y.
docstring: Find the points afterwards(aft) and forwards(fwd) that are closest
  to x_hinge. Retuns dictionaries aft and fwd, each with keys x and y.
docstring_tokens: Find the points afterwards ( aft ) and forwards ( fwd ) that are closest to x_hinge . Retuns dictionaries aft and fwd each with keys x and y .
code: def find_closest(data, x_hinge, fwd, aft):
          """ Find the points afterwards(aft) and forwards(fwd) that are closest
          to x_hinge. Retuns dictionaries aft and fwd, each with keys x and y."""
          for i in range(len(data['x'])):
              xi = data['x'][i]
              yi = data['y'][i]
              error = abs(xi - x_hinge)
      
              #If equal just save and break it
              if x_hinge == xi:
                  aft['x'] = xi
                  aft['y'] = yi
                  aft['error'] = error
                  fwd['x'] = xi
                  fwd['y'] = yi
                  fwd['error'] = error
                  break
              
              if xi > x_hinge and error < aft['error']:
                  aft['x'] = xi
                  aft['y'] = yi
                  aft['error'] = error
      
              if xi < x_hinge and error < fwd['error']:
                  fwd['x'] = xi
                  fwd['y'] = yi
                  fwd['error'] = error
          return fwd, aft
code_tokens: def find_closest ( data , x_hinge , fwd , aft ) : for i in range ( len ( data [ 'x' ] ) ) : xi = data [ 'x' ] [ i ] yi = data [ 'y' ] [ i ] error = abs ( xi - x_hinge ) if x_hinge == xi : aft [ 'x' ] = xi aft [ 'y' ] = yi aft [ 'error' ] = error fwd [ 'x' ] = xi fwd [ 'y' ] = yi fwd [ 'error' ] = error break if xi > x_hinge and error < aft [ 'error' ] : aft [ 'x' ] = xi aft [ 'y' ] = yi aft [ 'error' ] = error if xi < x_hinge and error < fwd [ 'error' ] : fwd [ 'x' ] = xi fwd [ 'y' ] = yi fwd [ 'error' ] = error return fwd , aft
short_docstring: Find the points afterwards(aft) and forwards(fwd) that are closest
  to x_hinge.
short_docstring_tokens: Find the points afterwards ( aft ) and forwards ( fwd ) that are closest to x_hinge .
comment: """ Find the points afterwards(aft) and forwards(fwd) that are closest
          to x_hinge. Retuns dictionaries aft and fwd, each with keys x and y."""$SEP$#If equal just save and break it