code: def match(uidentities, matcher, fastmode=False):
      
      if not isinstance(matcher, IdentityMatcher):
          raise TypeError("matcher is not an instance of IdentityMatcher")
  
      if fastmode:
          try:
              matcher.matching_criteria()
          except NotImplementedError:
              name = "'%s (fast mode)'" % matcher.__class__.__name__.lower()
              raise MatcherNotSupportedError(matcher=name)
  
      filtered, no_filtered, uuids = \
          _filter_unique_identities(uidentities, matcher)
  
      if not fastmode:
          matched = _match(filtered, matcher)
      else:
          matched = _match_with_pandas(filtered, matcher)
  
      matched = _build_matches(matched, uuids, no_filtered, fastmode)
  
      return matched
docs: Find matches in a set of unique identities.
  
      This function looks for possible similar or equal identities from a set
      of unique identities. The result will be a list of subsets where each
      subset is a list of matching identities.
  
      When `fastmode` is set a new and experimental matching algorithm
      will be used. It consumes more resources (a big amount of memory)
      but it is, at least, two orders of maginute faster than the
      classic algorithm.
  
      :param uidentities: list of unique identities to match
      :param matcher: instance of the matcher
      :param fastmode: use a faster algorithm
  
      :returns: a list of subsets with the matched unique identities
  
      :raises MatcherNotSupportedError: when matcher does not support fast
          mode matching
      :raises TypeError: when matcher is not an instance of
          IdentityMatcher class