code: def _ensure_vision(instance: object, module: Optional[Any]):
      if module is None:
          raise ImportError(
              f"{instance.__class__.__name__} requires `torchvision` to be installed."
          )
  
imports: import functools
  import pathlib
  from typing import Any, Callable, Optional, Sequence, Union
  import torch
  import torch.nn
  import torch.utils.data
  from class_resolver import OptionalKwargs
  from docdata import parse_docdata
  from .representation import BackfillRepresentation, Representation
  from .utils import ShapeError, WikidataCache
  from ..datasets import Dataset
  from ..triples import TriplesFactory
  from ..typing import OneOrSequence
label_desc: Use image node_id 1 for calling a global function with example usage: _ensure_vision(instance, module) without return types