docstr: Attempt to load all the meshes making up the default scene from
  the file as a list of possibly-named Meshes objects.
  
  Args:
      include_textures: Whether to try loading textures.
  
  Returns:
      Meshes object containing one mesh.
docstr_tok: ["Attempt","to","load","all","the","meshes","making","up","the","default","scene","from","the","file","as","a","list","of","possibly-named","Meshes","objects",".","Args",":","include_textures",":","Whether","to","try","loading","textures",".","Returns",":","Meshes","object","containing","one","mesh","."]
code: def load(
      self, include_textures: bool
  ) -> List[Tuple[Optional[str], Meshes]]:
      """
      Attempt to load all the meshes making up the default scene from
      the file as a list of possibly-named Meshes objects.
  
      Args:
          include_textures: Whether to try loading textures.
  
      Returns:
          Meshes object containing one mesh.
      """
      if self._json_data is None:
          raise ValueError("Initialization problem")
  
      # This loads the default scene from the file.
      # This is usually the only one.
      # It is possible to have multiple scenes, in which case
      # you could choose another here instead of taking the default.
      scene_index = self._json_data.get("scene")
  
      if scene_index is None:
          raise ValueError("Default scene is not specified.")
  
      scene = self._json_data["scenes"][scene_index]
      nodes = self._json_data.get("nodes", [])
      meshes = self._json_data.get("meshes", [])
      root_node_indices = scene["nodes"]
  
      mesh_transform = Transform3d()
      names_meshes_list: List[Tuple[Optional[str], Meshes]] = []
  
      # Keep track and apply the transform of the scene node to mesh vertices
      Q = deque(
          [
              (Transform3d(), node_index)
              for node_index in root_node_indices
          ]
      )
  
      while Q:
          parent_transform, current_node_index = Q.popleft()
  
          current_node = nodes[current_node_index]
  
          transform = _make_node_transform(current_node)
          current_transform = transform.compose(parent_transform)
  
          if "mesh" in current_node:
              mesh_index = current_node["mesh"]
              mesh = meshes[mesh_index]
              mesh_name = mesh.get("name", None)
              mesh_transform = current_transform
  
              for primitive in mesh["primitives"]:
                  attributes = primitive["attributes"]
                  accessor_index = attributes["POSITION"]
                  positions = torch.from_numpy(
                      self._access_data(accessor_index).copy()
                  )
                  positions = mesh_transform.transform_points(positions)
  
                  mode = primitive.get("mode", _PrimitiveMode.TRIANGLES)
                  if mode != _PrimitiveMode.TRIANGLES:
                      raise NotImplementedError("Non triangular meshes")
  
                  if "indices" in primitive:
                      accessor_index = primitive["indices"]
                      indices = self._access_data(
                          accessor_index
                      ).astype(np.int64)
                  else:
                      indices = np.arange(
                          0, len(positions), dtype=np.int64
                      )
                  indices = torch.from_numpy(indices.reshape(-1, 3))
  
                  texture = None
                  if include_textures:
                      texture = self.get_texture_for_mesh(
                          primitive, indices
                      )
  
                  mesh_obj = Meshes(
                      verts=[positions],
                      faces=[indices],
                      textures=texture,
                  )
                  names_meshes_list.append((mesh_name, mesh_obj))
  
          if "children" in current_node:
              children_node_indices = current_node["children"]
              Q.extend(
                  [
                      (current_transform, node_index)
                      for node_index in children_node_indices
                  ]
              )
  
      return names_meshes_list
  
imports: import json
  import struct
  import warnings
  from base64 import b64decode
  from collections import defaultdict, deque
  from enum import IntEnum
  from io import BytesIO
  from typing import Any, BinaryIO, cast, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from iopath.common.file_io import PathManager
  from PIL import Image
  from pytorch3d.io.utils import _open_file, PathOrStr
  from pytorch3d.renderer.mesh import TexturesBase, TexturesUV, TexturesVertex
  from pytorch3d.structures import join_meshes_as_scene, Meshes
  from pytorch3d.transforms import quaternion_to_matrix, Transform3d
  from .pluggable_formats import endswith, MeshFormatInterpreter
label_desc: Use image node_id 8 for calling the _GLTFLoader obj's underlying member method code with example usage: obj.load(include_textures) and returns: names_meshes_list