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)
The core high-level code for running Slither static analysis.

    Returns:
        list(result), int: Result list and number of contracts analyzed