code: def _from_numpy(value: np.ndarray, device: _DEVICE) -> Tensor:
      return torch.from_numpy(value).to(device)
  
file_path: pytorch-lightning/src/lightning/fabric/utilities/apply_func.py
imports: from abc import ABC
  from functools import partial
  from typing import Any, Callable, List, Tuple, Union
  import numpy
  import torch
  from lightning_utilities.core.apply_func import apply_to_collection
  from torch import Tensor
  from lightning.fabric.utilities.types import _DEVICE
label_desc: Use image node_id 1 for calling a global function with example usage: _from_numpy(value, device) and returns: torch