<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def as_representer(resource, content_type):
 """ Adapts the given resource and content type to a representer. :param resource: resource to adapt. :param str content_type: content (MIME) type to obtain a representer for. """

    reg = get_current_registry()
    rpr_reg = reg.queryUtility(IRepresenterRegistry)
    return rpr_reg.create(type(resource), content_type)