def METHOD_NAME(obj):
    """Inverse of dfs_serialize_ndarray."""
    if isinstance(obj, abc.Mapping):
        if obj.get('type', '') == 'array':
            return deserialize_ndarray(obj)
        return {key: METHOD_NAME(val) for key, val in obj.items()}
    elif isinstance(obj, abc.Sequence) and not isinstance(obj, str):
        return list(map(METHOD_NAME, obj))
    return obj