def lookup(schema):
    """
    Lookup a class by property schema.

    """
    if not isinstance(schema, dict) or "$ref" not in schema:
        return None

    ref = schema["$ref"]

    return REGISTRY.get(ref)
Lookup a class by property schema.