<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _args_to_cromwell(args):
 """Convert input arguments into cromwell inputs for config and command line. """

    default_config = {"slurm": {"timelimit": "1-00:00", "account": ""},
                      "sge": {"memtype": "mem_free", "pename": "smp"},
                      "lsf": {"walltime": "24:00", "account": ""},
                      "htcondor": {},
                      "torque": {"walltime": "24:00:00", "account": ""},
                      "pbspro": {"walltime": "24:00:00", "account": "",
                                 "cpu_and_mem": "-l select=1:ncpus=${cpu}:mem=${memory_mb}mb"}}
    prefixes = {("account", "slurm"): "-A ", ("account", "pbspro"): "-A "}
    custom = {("noselect", "pbspro"): ("cpu_and_mem", "-l ncpus=${cpu} -l mem=${memory_mb}mb")}
    cl = []
    config = {}
    # HPC scheduling
    if args.scheduler:
        if args.scheduler not in default_config:
            raise ValueError("Scheduler not yet supported by Cromwell: %s" % args.scheduler)
        if not args.queue and args.scheduler not in ["htcondor"]:
            raise ValueError("Need to set queue (-q) for running with an HPC scheduler")
        config = default_config[args.scheduler]
        cl.append("-Dbackend.default=%s" % args.scheduler.upper())
        config["queue"] = args.queue
        for rs in args.resources:
            for r in rs.split(";"):
                parts = r.split("=")
                if len(parts) == 2:
                    key, val = parts
                    config[key] = prefixes.get((key, args.scheduler), "") + val
                elif len(parts) == 1 and (parts[0], args.scheduler) in custom:
                    key, val = custom[(parts[0], args.scheduler)]
                    config[key] = val
    cloud_type = None
    if args.cloud_project:
        if args.cloud_root and args.cloud_root.startswith("gs:"):
            cloud_type = "PAPI"
            cloud_root = args.cloud_root
            cloud_region = None
        elif ((args.cloud_root and args.cloud_root.startswith("s3:")) or
              (args.cloud_project and args.cloud_project.startswith("arn:"))):
            cloud_type = "AWSBATCH"
            cloud_root = args.cloud_root
            if not cloud_root.startswith("s3://"):
                cloud_root = "s3://%s" % cloud_root
            # split region from input Amazon Resource Name, ie arn:aws:batch:us-east-1:
            cloud_region = args.cloud_project.split(":")[3]
        else:
            raise ValueError("Unexpected inputs for Cromwell Cloud support: %s %s" %
                             (args.cloud_project, args.cloud_root))
        config = {"cloud_project": args.cloud_project, "cloud_root": cloud_root, "cloud_region": cloud_region}
        cl.append("-Dbackend.default=%s" % cloud_type)
    return cl, config, args.scheduler, cloud_type