def negotiate_decoder(content_type=None, decoders=None):
    if decoders is None:
        decoders = default_decoders

    if content_type is None:
        return decoders[0]

    content_type = content_type.split(';')[0].strip().lower()
    for codec in decoders:
        if codec.media_type == content_type:
            return codec

    msg = "Unsupported media in Content-Type header '%s'" % content_type
    raise UnsupportedContentType(msg)
Read current rule set.
dataset/ETHPy150Open core-api/python-client/coreapi/codecs/__init__.py/negotiate_decoder--crossover with--dataset/ETHPy150Open kdart/pycopia/core/pycopia/OS/FreeBSD/firewall.py/Firewall.read