<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_mapping(repo, content_type):
 """ Return an ES mapping for a content type in a repository. :param Repo repo: This git repository. :returns: dict """

    try:
        with open(
            os.path.join(repo.working_dir,
                         '_mappings',
                         '%s.json' % (content_type,)), 'r') as fp:
            return json.load(fp)
    except IOError:
        raise NotFound('Mapping does not exist.')