code: def locate_keys(self, keys, strict=True):
          
  
          # check inputs
          keys = UniqueIndex(keys)
  
          # 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 keys.
  
          Examples
          --------
  
          >>> import allel
          >>> idx = allel.UniqueIndex(['A', 'C', 'B', 'F'])
          >>> idx.locate_keys(['F', 'C'])
          array([False,  True, False,  True])
          >>> idx.locate_keys(['X', 'F', 'G', 'C', 'Z'], strict=False)
          array([False,  True, False,  True])