class_docstr: Basic interface for a generator model.
  
  Users can inherit from this class and implement their own generator model. The requirements are that the ``sample``
  method is implemented and that the ``num_classes`` attribute is present when ``conditional=True`` metric.
docstr: Sample from the generator.
  
  Args:
      num_samples: Number of samples to generate.
docstr_tok: ["Sample","from","the","generator",".","Args",":","num_samples",":","Number","of","samples","to","generate","."]
code: def sample(self, num_samples: int) -> Tensor:
      """Sample from the generator.
  
      Args:
          num_samples: Number of samples to generate.
  
      """
      raise NotImplementedError
  
file_path: torchmetrics/src/torchmetrics/functional/image/perceptual_path_length.py
imports: import math
  from typing import Literal, Optional, Tuple, Union
  import torch
  from torch import Tensor, nn
  from torchmetrics.functional.image.lpips import _LPIPS
  from torchmetrics.utilities.imports import _TORCHVISION_AVAILABLE
label_desc: Use image node_id 2 for calling the GeneratorType obj's underlying member method code with example usage: obj.sample(num_samples) without return types