code: def to_ivy_shape(fn: Callable) -> Callable:
      """Wrap `fn` so it receives `ivy.Shape` instances.
  
      Wrap `fn` so that any `torch_frontend.Size` arguments are converted to
      `ivy.Shape` instances.
      """
  
      @functools.wraps(fn)
      def to_ivy_shape_torch(*args, **kwargs):
          new_kwargs = {
              key: (
                  value.ivy_shape
                  if key in ["shape", "size"]
                  and isinstance(
                      value, ivy.functional.frontends.torch.Size
                  )
                  else value
              )
              for key, value in kwargs.items()
          }
          # if any of the args are instance of torch_frontend.Size,
          # convert them to ivy.Shape.
          new_args = ivy.nested_map(
              lambda x: (
                  x.ivy_shape
                  if isinstance(x, ivy.functional.frontends.torch.Size)
                  else x
              ),
              args,
              shallow=False,
          )
          return fn(*new_args, **new_kwargs)
  
      to_ivy_shape_torch.to_ivy_shape_torch = True
      return to_ivy_shape_torch
  
imports: import functools
  from typing import Callable
  import ivy
  import ivy.functional.frontends.torch
label_desc: Use image node_id 8 for calling a global function with example usage: to_ivy_shape(fn) and returns: to_ivy_shape_torch, fn