class_docstr: :class:`ProfilerPenalty` for a single sample.
  Value for each label is a specifically chosen value.
class_docstr_tok: [":","class",":","`","ProfilerPenalty","`","for","a","single","sample",".","Value","for","each","label","is","a","specifically","chosen","value","."]
docstr: Profile based on a single sample.
docstr_tok: ["Profile","based","on","a","single","sample","."]
code: def profile(self, sample: Sample) -> float:
      """Profile based on a single sample."""
      return self.profiler.profile(sample)
  
imports: from __future__ import annotations
  import logging
  from typing import cast
  from typing_extensions import Literal
  import numpy
  import torch
  from torch import nn
  from nni.mutable import Sample
  from nni.nas.profiler import Profiler, ExpressionProfiler
  from .supermodule._expression_utils import expression_expectation
label_desc: Use image node_id 1 for calling the SampleProfilerPenalty obj's underlying member method code with example usage: obj.profile(sample) and returns: self