code: def intersect(self, other):
          
  
          loc = self.locate_keys(other, strict=False)
          return self.compress(loc, axis=0)
docs: Intersect with `other` sorted index.
  
          Parameters
          ----------
          other : array_like, int
              Array of values to intersect with.
  
          Returns
          -------
          out : SortedIndex
              Values in common.
  
          Examples
          --------
  
          >>> import allel
          >>> idx1 = allel.SortedIndex([3, 6, 11, 20, 35])
          >>> idx2 = allel.SortedIndex([4, 6, 20, 39])
          >>> idx1.intersect(idx2)
          <SortedIndex shape=(2,) dtype=int64>
          [6, 20]