<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process(filename, args, detector_classes, printer_classes):
 """ The core high-level code for running Slither static analysis. Returns: list(result), int: Result list and number of contracts analyzed """

    ast = '--ast-compact-json'
    if args.legacy_ast:
        ast = '--ast-json'
    args.filter_paths = parse_filter_paths(args)
    slither = Slither(filename,
                      ast_format=ast,
                      **vars(args))

    return _process(slither, detector_classes, printer_classes)