nodes: 0, module; 1, function_definition; 2, function_name:searchsorted; 3, parameters; 4, block; 5, identifier:self; 6, identifier:value; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, comment:# We are much more performant if the searched; 11, comment:# indexer is the same type as the array.; 12, comment:#; 13, comment:# This doesn't matter for int64, but DOES; 14, comment:# matter for smaller int dtypes.; 15, comment:#; 16, comment:# xref: https://github.com/numpy/numpy/issues/5370; 17, try_statement; 18, return_statement; 19, identifier:side; 20, string:"left"; 21, identifier:sorter; 22, None; 23, comment:"""
          Find indices to insert `value` so as to maintain order.
  
          For full documentation, see `numpy.searchsorted`
  
          See Also
          --------
          numpy.searchsorted : Equivalent function.
          """; 24, block; 25, except_clause; 26, call; 27, expression_statement; 28, identifier:ValueError; 29, block; 30, attribute; 31, argument_list; 32, assignment; 33, pass_statement; 34, call; 35, identifier:searchsorted; 36, identifier:value; 37, keyword_argument; 38, keyword_argument; 39, identifier:value; 40, call; 41, identifier:super; 42, argument_list; 43, identifier:side; 44, identifier:side; 45, identifier:sorter; 46, identifier:sorter; 47, attribute; 48, argument_list; 49, attribute; 50, identifier:type; 51, identifier:value; 52, identifier:self; 53, identifier:dtype
code: def searchsorted(self, value, side="left", sorter=None):
          """
          Find indices to insert `value` so as to maintain order.
  
          For full documentation, see `numpy.searchsorted`
  
          See Also
          --------
          numpy.searchsorted : Equivalent function.
          """
  
          # We are much more performant if the searched
          # indexer is the same type as the array.
          #
          # This doesn't matter for int64, but DOES
          # matter for smaller int dtypes.
          #
          # xref: https://github.com/numpy/numpy/issues/5370
          try:
              value = self.dtype.type(value)
          except ValueError:
              pass
  
          return super().searchsorted(value, side=side, sorter=sorter)