code: def to_numpy(tensor):
      return tensor.detach().cpu().numpy()
  
file_path: BentoML/examples/pytorch_mnist/service.py
imports: from __future__ import annotations
  import typing
  from typing import TYPE_CHECKING
  import numpy
  from PIL.Image import Image
  import bentoml
  from bentoml.io import Image
  from bentoml.io import NumpyNdarray
label_desc: Use image node_id 1 for calling a global function with example usage: to_numpy(tensor) and returns: tensor