def METHOD_NAME(d: TensorDict) -> TensorDict:
    """
    Returns a shallow copy of the tensordict. Different dictionary object (recursively) but referencing
    the same tensors.
    """
    d_copy = copy_dict_structure(d)
    for d1, d2, key, v1, v2 in iter_dicts_recursively(d, d_copy):
        d2[key] = v1
    return d_copy