<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def output_reduce(input_file, path=True, pdb_name=None, force=False):
 """Runs Reduce on a pdb or mmol file and creates a new file with the output. Parameters input_file : str or pathlib.Path Path to file to run Reduce on. path : bool True if input_file is a path. pdb_name : str PDB ID of protein. Required if providing string not path. force : bool True if existing reduce outputs should be overwritten. Returns ------- output_path : pathlib.Path Location of output file. """

    if path:
        output_path = reduce_output_path(path=input_file)
    else:
        output_path = reduce_output_path(pdb_name=pdb_name)
    if output_path.exists() and not force:
        return output_path
    reduce_mmol, reduce_message = run_reduce(input_file, path=path)
    if not reduce_mmol:
        return None
    output_path.parent.mkdir(exist_ok=True)
    output_path.write_text(reduce_mmol)
    return output_path