code: def locate_intersection(self, other):
          
  
          # check inputs
          other = SortedIndex(other, copy=False)
  
          # find intersection
          assume_unique = self.is_unique and other.is_unique
          loc = np.in1d(self, other, assume_unique=assume_unique)
          loc_other = np.in1d(other, self, assume_unique=assume_unique)
  
          return loc, loc_other
docs: Locate the intersection with another array.
  
          Parameters
          ----------
          other : array_like, int
              Array of values to intersect.
  
          Returns
          -------
          loc : ndarray, bool
              Boolean array with location of intersection.
          loc_other : ndarray, bool
              Boolean array with location in `other` of intersection.
  
          Examples
          --------
  
          >>> import allel
          >>> idx1 = allel.SortedIndex([3, 6, 11, 20, 35])
          >>> idx2 = allel.SortedIndex([4, 6, 20, 39])
          >>> loc1, loc2 = idx1.locate_intersection(idx2)
          >>> loc1
          array([False,  True, False,  True, False])
          >>> loc2
          array([False,  True,  True, False])
          >>> idx1[loc1]
          <SortedIndex shape=(2,) dtype=int64>
          [6, 20]
          >>> idx2[loc2]
          <SortedIndex shape=(2,) dtype=int64>
          [6, 20]