code: def unique(sorted_array):
      """
      More efficient implementation of np.unique for sorted arrays
      :param sorted_array: (np.ndarray)
      :return:(np.ndarray) sorted_array without duplicate elements
      """
      if len(sorted_array) == 1:
          return sorted_array
      left = sorted_array[:-1]
      right = sorted_array[1:]
      uniques = np.append(right != left, True)
      return sorted_array[uniques]
  
file_path: stable-baselines/stable_baselines/common/segment_tree.py
imports: import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: unique(sorted_array) and returns: sorted_array, sorted_array