class_docstr: A `Forecast` object, where the predicted distribution is represented
  internally as samples.
  
  Parameters
  ----------
  samples
      Array of size (num_samples, prediction_length) (1D case) or
      (num_samples, prediction_length, target_dim) (multivariate case)
  start_date
      Start of the forecast.
  item_id
      Identifier of the item being forecasted.
  info
      Additional information that the forecaster may provide e.g. estimated
      parameters, number of iterations ran etc.
class_docstr_tok: ["A","`","Forecast","`","object",",","where","the","predicted","distribution","is","represented","internally","as","samples",".","Parameters","--","--","--","--","--","samples","Array","of","size","(","num_samples",",","prediction_length",")","(","1D","case",")","or","(","num_samples",",","prediction_length",",","target_dim",")","(","multivariate","case",")","start_date","Start","of","the","forecast",".","item_id","Identifier","of","the","item","being","forecasted",".","info","Additional","information","that","the","forecaster","may","provide","e.g",".","estimated","parameters",",","number","of","iterations","ran","etc","."]
docstr: The number of samples representing the forecast.
code: def num_samples(self):
      """
      The number of samples representing the forecast.
      """
      return self.samples.shape[0]
  
imports: import re
  import logging
  from dataclasses import field
  from typing import Callable, Dict, List, Optional, Union, Tuple
  import numpy
  import pandas
  from gluonts.core.component import validated
  from gluonts.pydantic import dataclass
  from gluonts import maybe
label_desc: Use image node_id 3 for calling the SampleForecast obj's underlying member method code with example usage: obj.num_samples() and returns: self