code: def _searchsorted(  # pylint: disable=unused-argument
      sorted_sequence, values, side="left", out_type=np.int32, name=None
  ):
      """Find indices for insertion for list to remain sorted."""
      if JAX_MODE:
          try:
              func = _searchsorted_vmap_sides[side]
          except KeyError:
              raise ValueError(
                  "'%s' is an invalid value for keyword 'side'" % side
              )
          sorted_sequence_2d = np.reshape(
              sorted_sequence, (-1, sorted_sequence.shape[-1])
          )
          values_2d = np.reshape(values, (-1, values.shape[-1]))
          if sorted_sequence_2d.shape[0] != values_2d.shape[0]:
              raise ValueError(
                  "Leading dim_size of both tensors must match."
              )
          return np.reshape(
              func(sorted_sequence_2d, values_2d).astype(out_type),
              values.shape,
          )
      # We don't use np.searchsorted in the numpy backend because it doesn't support
      # batching.
      sorted_sequence = sorted_sequence[..., np.newaxis, :]
      values = values[..., :, np.newaxis]
      if side == "left":
          is_in_right_location = sorted_sequence < values
      elif side == "right":
          is_in_right_location = sorted_sequence <= values
      return np.sum(is_in_right_location, axis=-1).astype(out_type)
  
imports: import functools
  import numpy
  import numpy
  from tensorflow_probability.python.internal.backend.numpy import _utils
  from tensorflow_probability.python.internal.backend.numpy import ops
  from tensorflow_probability.python.internal.backend.numpy.linalg_impl import einsum
  from tensorflow_probability.python.internal.backend.numpy.linalg_impl import norm
  from tensorflow_probability.python.internal.backend.numpy.linalg_impl import tensordot
label_desc: Use image node_id 14 for calling a global function with example usage: _searchsorted(sorted_sequence, values, side, out_type, name) and returns: np, np