<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_mapper(self, mapper, content_type, shortname=None):
 """ Register new mapper. :param mapper: mapper object needs to implement ``parse()`` and ``format()`` functions. """


        self._check_mapper(mapper)
        cont_type_names = self._get_content_type_names(content_type, shortname)
        self._datamappers.update(dict([(name, mapper) for name in cont_type_names]))