code: def data_to_table(data, low: Optional[float], high: Optional[float]):
      table = []
  
      try:
          import torch
      except ImportError:
          torch = None
  
      if torch is not None and isinstance(data, torch.Tensor):
          data = data.detach().cpu().numpy()
  
      data: np.ndarray = data.ravel()
  
      for i in range(data.shape[0]):
          v = data[i]
          if low is not None and v < low:
              continue
          if high is not None and v > high:
              continue
          table.append({"value": v})
  
      return alt.Data(values=table)
  
imports: from typing import Optional
  import altair
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: data_to_table(data, low, high) and returns: alt