code: def from_trimesh(mesh: Any) -> "torch_geometric.data.Data":
      r"""Converts a :obj:`trimesh.Trimesh` to a
      :class:`torch_geometric.data.Data` instance.
  
      Args:
          mesh (trimesh.Trimesh): A :obj:`trimesh` mesh.
  
      Example:
          >>> pos = torch.tensor([[0, 0, 0], [1, 0, 0], [0, 1, 0], [1, 1, 0]],
          ...                    dtype=torch.float)
          >>> face = torch.tensor([[0, 1, 2], [1, 2, 3]]).t()
  
          >>> data = Data(pos=pos, face=face)
          >>> mesh = to_trimesh(data)
          >>> from_trimesh(mesh)
          Data(pos=[4, 3], face=[3, 2])
      """
      from torch_geometric.data import Data
  
      pos = torch.from_numpy(mesh.vertices).to(torch.float)
      face = torch.from_numpy(mesh.faces).t().contiguous()
  
      return Data(pos=pos, face=face)
  
file_path: pytorch_geometric/torch_geometric/utils/convert.py
imports: from collections import defaultdict
  from typing import Any, Dict, Iterable, List, Literal, Optional, Tuple, Union
  import scipy.sparse
  import torch
  from torch import Tensor
  from torch.utils.dlpack import from_dlpack, to_dlpack
  import torch_geometric
  from torch_geometric.utils.num_nodes import maybe_num_nodes
label_desc: Use image node_id 8 for calling a global function with example usage: from_trimesh(mesh) and returns: Data