def import_identities(self, parser, matching=None, match_new=False,
                          no_strict_matching=False,
                          reset=False, verbose=False):
        """Import identities information on the registry.

        New unique identities, organizations and enrollment data parsed
        by 'parser' will be added to the registry.

        Optionally, this method can look for possible identities that match with
        the new one to insert using 'matching' method. If a match is found,
        that means both identities are likely the same. Therefore, both identities
        would be merged into one. The 'match_new' parameter can be set to match
        and merge only new loaded identities. Rigorous validation of mathching
        values (i.e, well formed email addresses) will be disabled when
        <no_strict_matching> is set to to `True`.

        When `reset` is set, relationships and enrollments will be removed
        before loading any data.

        :param parser: sorting hat parser
        :param matching: type of matching used to merge existing identities
        :param match_new: match and merge only the new loaded identities
        :param no_strict_matching: disable strict matching (i.e, well-formed email addresses)
        :param reset: remove relationships and enrollments before loading data
        :param verbose: run in verbose mode when matching is set
        """
        matcher = None

        if matching:
            strict = not no_strict_matching

            try:
                blacklist = api.blacklist(self.db)
                matcher = create_identity_matcher(matching, blacklist, strict=strict)
            except MatcherNotSupportedError as e:
                self.error(str(e))
                return e.code

        uidentities = parser.identities

        try:
            self.__load_unique_identities(uidentities, matcher, match_new,
                                          reset, verbose)
        except LoadError as e:
            self.error(str(e))
            return e.code

        return CMD_SUCCESS
Import identities information on the registry.

        New unique identities, organizations and enrollment data parsed
        by 'parser' will be added to the registry.

        Optionally, this method can look for possible identities that match with
        the new one to insert using 'matching' method. If a match is found,
        that means both identities are likely the same. Therefore, both identities
        would be merged into one. The 'match_new' parameter can be set to match
        and merge only new loaded identities. Rigorous validation of mathching
        values (i.e, well formed email addresses) will be disabled when
        <no_strict_matching> is set to to `True`.

        When `reset` is set, relationships and enrollments will be removed
        before loading any data.

        :param parser: sorting hat parser
        :param matching: type of matching used to merge existing identities
        :param match_new: match and merge only the new loaded identities
        :param no_strict_matching: disable strict matching (i.e, well-formed email addresses)
        :param reset: remove relationships and enrollments before loading data
        :param verbose: run in verbose mode when matching is set