def METHOD_NAME(x):
    if is_nested(x):
        # Fast-fail version of all(should_cache)
        for y in x:
            if not METHOD_NAME(y):
                return False
        return True
    return isinstance(x, torch.nn.parameter.Parameter) and \
        type_string(x) == 'FloatTensor'