code: def maybe_cast_to_tensor_info(value: Any) -> Union[Any, TensorInfo]:
      if not isinstance(value, dict):
          return value
      if len(value) < 1 or len(value) > 3:
          return value
      if "dtype" not in value:
          return value
      if (
          len(set(value.keys()) | {"dtype", "size", "is_edge_index"})
          != 3
      ):
          return value
      return TensorInfo.cast(value)
  
imports: import pickle
  import warnings
  from abc import ABC, abstractmethod
  from dataclasses import dataclass
  from functools import cached_property
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  from uuid import uuid4
  import torch
  from torch import Tensor
  from tqdm import tqdm
  from torch_geometric import EdgeIndex
  from torch_geometric.edge_index import SortOrder
  from torch_geometric.utils.mixin import CastMixin
label_desc: Use image node_id 1 for calling a global function with example usage: maybe_cast_to_tensor_info(value) and returns: TensorInfo, value, value, value, value