<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def copy_job_order(job, job_order_object):
 # type: (Any, Any) -> Any """Create copy of job object for provenance."""

    if not hasattr(job, "tool"):
        # direct command line tool execution
        return job_order_object
    customised_job = {}  # new job object for RO
    for each, i in enumerate(job.tool["inputs"]):
        with SourceLine(job.tool["inputs"], each, WorkflowException,
                        _logger.isEnabledFor(logging.DEBUG)):
            iid = shortname(i["id"])
            if iid in job_order_object:
                customised_job[iid] = copy.deepcopy(job_order_object[iid])
                # add the input element in dictionary for provenance
            elif "default" in i:
                customised_job[iid] = copy.deepcopy(i["default"])
                # add the default elements in the dictionary for provenance
            else:
                pass
    return customised_job