class_docstr: Base class for training instances.
class_docstr_tok: ["Base","class","for","training","instances","."]
docstr: The number of instances.
docstr_tok: ["The","number","of","instances","."]
code: def __len__(self):  # noqa:D401
      """The number of instances."""
      raise NotImplementedError
  
imports: import math
  from abc import ABC, abstractmethod
  from typing import Callable, Generic, Iterable, Iterator, List, NamedTuple, Optional, Tuple, TypeVar
  import numpy
  import scipy.sparse
  import torch
  from class_resolver import HintOrType, OptionalKwargs
  from torch.utils import data
  from .utils import compute_compressed_adjacency_list
  from ..sampling import NegativeSampler, negative_sampler_resolver
  from ..typing import MappedTriples
label_desc: Use image node_id 1 for calling the Instances obj's underlying member method code with example usage: obj.__len__() without return types