def convert_custom_objects(obj):
    'Handles custom object lookup.\n\n        Arguments:\n            obj: object, dict, or list.\n\n        Returns:\n            The same structure, where occurrences\n                of a custom object name have been replaced\n                with the custom object.\n        '
    if isinstance(obj, list):
        deserialized = []
        for value in obj:
            deserialized.append(convert_custom_objects(value))
        return deserialized
    if isinstance(obj, dict):
        deserialized = {}
        for (key, value) in obj.items():
            deserialized[key] = convert_custom_objects(value)
        return deserialized
    if (obj in custom_objects):
        return custom_objects[obj]
    return obj
Handles custom object lookup.

Arguments:
    obj: object, dict, or list.

Returns:
    The same structure, where occurrences
        of a custom object name have been replaced
        with the custom object.
def convert_custom_objects(obj):
    'Handles custom object lookup.\n\n        Arguments:\n            obj: object, dict, or list.\n\n        Returns:\n            The same structure, where occurrences\n                of a custom object name have been replaced\n                with the custom object.\n        '
    if isinstance(obj, list):
        deserialized = []
        for value in obj:
            deserialized.append(convert_custom_objects(value))
        return deserialized
    if isinstance(obj, dict):
        deserialized = {}
        for (key, value) in obj.items():
            deserialized[key] = convert_custom_objects(value)
        return deserialized
    if (obj in custom_objects):
        return custom_objects[obj]
    return obj