code: def run(self, *args):
          
          params = self.parser.parse_args(args)
  
          with params.infile as infile:
              try:
                  stream = self.__read_file(infile)
                  parser = SortingHatParser(stream)
              except InvalidFormatError as e:
                  self.error(str(e))
                  return e.code
              except (IOError, TypeError, AttributeError) as e:
                  raise RuntimeError(str(e))
  
          if params.identities:
              self.import_blacklist(parser)
              code = self.import_identities(parser,
                                            matching=params.matching,
                                            match_new=params.match_new,
                                            no_strict_matching=params.no_strict,
                                            reset=params.reset,
                                            verbose=params.verbose)
          elif params.orgs:
              self.import_organizations(parser, params.overwrite)
              code = CMD_SUCCESS
          else:
              self.import_organizations(parser, params.overwrite)
              self.import_blacklist(parser)
              code = self.import_identities(parser, matching=params.matching,
                                            match_new=params.match_new,
                                            no_strict_matching=params.no_strict,
                                            reset=params.reset,
                                            verbose=params.verbose)
  
          return code
docs: Import data on the registry.
  
          By default, it reads the data from the standard input. If a positional
          argument is given, it will read the data from there.