code: def locate_keys(self, keys, strict=True):
          
  
          # check inputs
          keys = SortedIndex(keys, copy=False)
  
          # find intersection
          loc, found = self.locate_intersection(keys)
  
          if strict and np.any(~found):
              raise KeyError(keys[~found])
  
          return loc
docs: Get index locations for the requested keys.
  
          Parameters
          ----------
          keys : array_like
              Array of keys to locate.
          strict : bool, optional
              If True, raise KeyError if any keys are not found in the index.
  
          Returns
          -------
          loc : ndarray, bool
              Boolean array with location of values.
  
          Examples
          --------
  
          >>> import allel
          >>> idx1 = allel.SortedIndex([3, 6, 11, 20, 35])
          >>> idx2 = allel.SortedIndex([4, 6, 20, 39])
          >>> loc = idx1.locate_keys(idx2, strict=False)
          >>> loc
          array([False,  True, False,  True, False])
          >>> idx1[loc]
          <SortedIndex shape=(2,) dtype=int64>
          [6, 20]