<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compile_file(filepath, libraries=None, combined='bin,abi', optimize=True, extra_args=None):
 """ Return the compile contract code. Args: filepath (str):
 The path to the contract source code. libraries (dict):
 A dictionary mapping library name to it's address. combined (str):
 The argument for solc's --combined-json. optimize (bool):
 Enable/disables compiler optimization. Returns: dict: A mapping from the contract name to it's binary. """


    workdir, filename = os.path.split(filepath)

    args = solc_arguments(
        libraries=libraries,
        combined=combined,
        optimize=optimize,
        extra_args=extra_args)
    args.insert(0, get_compiler_path())
    args.append(filename)

    output = subprocess.check_output(args, cwd=workdir)

    return solc_parse_output(output)