code: def locate_intersection(self, other):
          
  
          # check inputs
          other = UniqueIndex(other)
  
          # find intersection
          assume_unique = True
          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
              Array 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.UniqueIndex(['A', 'C', 'B', 'F'], dtype=object)
          >>> idx2 = allel.UniqueIndex(['X', 'F', 'G', 'C', 'Z'], dtype=object)
          >>> loc1, loc2 = idx1.locate_intersection(idx2)
          >>> loc1
          array([False,  True, False,  True])
          >>> loc2
          array([False,  True, False,  True, False])
          >>> idx1[loc1]
          <UniqueIndex shape=(2,) dtype=object>
          ['C', 'F']
          >>> idx2[loc2]
          <UniqueIndex shape=(2,) dtype=object>
          ['F', 'C']