def METHOD_NAME(t):
    if torch.is_tensor(t):
        return tuple(t.shape)
    elif isinstance(t, dict):
        return {n: METHOD_NAME(q) for n, q in t.items()}
    elif isinstance(t, (list, tuple)):
        return [METHOD_NAME(q) for q in t]
    elif isinstance(t, numbers.Number):
        return type(t)
    else:
        raise ValueError('unexpected type {}'.format(type(t)))