docs: def lograptor(files, patterns=None, matcher='ruled', cfgfiles=None, apps=None, hosts=None,
                filters=None, time_period=None, time_range=None, case=False, invert=False,
                word=False, files_with_match=None, count=False, quiet=False, max_count=0,
                only_matching=False, line_number=False, with_filename=None,
                ip_lookup=False, uid_lookup=False, anonymize=False, thread=False,
                before_context=0, after_context=0, context=0):
      """
      Run lograptor with arguments. Experimental feature to use the log processor into
      generic Python scripts. This part is still under development, do not use.
  
      :param files: Input files. Each argument can be a file path or a glob pathname.
      :param patterns: Regex patterns, select the log line if at least one pattern matches.
      :param matcher: Matcher engine, can be 'ruled' (default), 'unruled' or 'unparsed'.
      :param cfgfiles: use a specific configuration file.
      :param apps: process the log lines related to a list of applications.
      :param hosts: process the log lines related to a list of hosts.
      :param filters: process the log lines that match all the conditions for rule's field values.
      :param time_range: process the log lines related to a time range.
      :param time_period: restrict the search scope to a date or a date interval.
      :param case: ignore case distinctions, defaults to `False`.
      :param invert: invert the sense of patterns regexp matching.
      :param word: force PATTERN to match only whole words.
      :param files_with_match: get only names of FILEs containing matches, defaults is `False`.
      :param count: get only a count of matching lines per FILE.
      :param quiet: suppress all normal output.
      :param max_count: stop after NUM matches.
      :param only_matching: get only the part of a line matching PATTERN.
      :param line_number: get line number with output lines.
      :param with_filename: get or suppress the file name for each match.
      :param ip_lookup: translate IP addresses to DNS names.
      :param uid_lookup: translate numeric UIDs to usernames.
      :param anonymize: anonymize defined rule's fields value.
      :param thread: get the lines of logs related to each log line selected.
      :param before_context: get NUM lines of leading context for each log line selected.
      :param after_context: get NUM lines of trailing context for each log line selected.
      :param context: get NUM lines of output context for each log line selected.
      :return:
      """
      cli_parser = create_argument_parser()
      args = cli_parser.parse_args()
      args.files = files
      args.matcher = matcher
      args.cfgfiles = cfgfiles
      args.time_period = time_period
      args.time_range = time_range
      args.case = case
      args.invert = invert
      args.word = word
      args.files_with_match = files_with_match
      args.count = count
      args.quiet = quiet
      args.max_count = max_count
      args.only_matching = only_matching
      args.line_number = line_number
      args.with_filename = with_filename
      args.anonymize = anonymize
      args.ip_lookup = ip_lookup
      args.uid_lookup = uid_lookup
      args.thread = thread
      args.context = context
      args.after_context = after_context
      args.before_context = before_context
      args.patterns = [''] if patterns is None else patterns
  
      if apps is not None:
          args.apps = apps
      if hosts is not None:
          args.hosts = hosts
      if filters is not None:
          args.filters = filters
  
      _lograptor = LogRaptor(args)
      return _lograptor()