code: def to_numpy(values: Any):
      """Converts tensors in a nested structure to numpy.
  
      Converts tensors from TensorFlow to Numpy if needed without importing TF
      dependency.
  
      Args:
        values: nested structure with numpy and / or TF tensors.
  
      Returns:
        Same nested structure as values, but with numpy tensors.
      """
      return tree.map_structure(tensor_to_numpy, values)
  
file_path: acme/acme/utils/loggers/base.py
imports: import abc
  from typing import Any, Mapping, Optional
  import numpy
  import tree
  from typing_extensions import Protocol
label_desc: Use image node_id 2 for calling a global function with example usage: to_numpy(values) and returns: tree