from typing import Optional


def _remove_version_metadata_from_job_definition(job_def: Optional[dict]) -> Optional[dict]:
    """Returns a new dict. Changes are not inplace"""
    if job_def is not None:
        job_def = job_def.copy()
        for key in ['jobDefinitionArn', 'revision', 'status']:
            del job_def[key]
    return job_def