class_docstr: Adapter for tensorflow-probability distributions.
docstr: Sample from the distribution.
  
  Parameters
  ----------
  n_samples : int, optional, default = None
  
  Returns
  -------
  if `n_samples` is `None`:
  returns a sample that contains a single sample from `self`,
  in `pd.DataFrame` mtype format convention, with `index` and `columns` as `self`
  if n_samples is `int`:
  returns a `pd.DataFrame` that contains `n_samples` i.i.d. samples from `self`,
  in `pd-multiindex` mtype format convention, with same `columns` as `self`,
  and `MultiIndex` that is product of `RangeIndex(n_samples)` and `self.index`
docstr_tok: ["Sample","from","the","distribution",".","Parameters","--","--","--","--","--","n_samples",":","int",",","optional",",","default","=","None","Returns","--","--","--","-","if","`","n_samples","`","is","`","None","`",":","returns","a","sample","that","contains","a","single","sample","from","`","self","`",",","in","`","pd.DataFrame","`","mtype","format","convention",",","with","`","index","`","and","`","columns","`","as","`","self","`","if","n_samples","is","`","int","`",":","returns","a","`","pd.DataFrame","`","that","contains","`","n_samples","`","i.i.d",".","samples","from","`","self","`",",","in","`","pd-multiindex","`","mtype","format","convention",",","with","same","`","columns","`","as","`","self","`",",","and","`","MultiIndex","`","that","is","product","of","`","RangeIndex","(","n_samples",")","`","and","`","self.index","`"]
code: def sample(self, n_samples=None):
      """Sample from the distribution.
  
      Parameters
      ----------
      n_samples : int, optional, default = None
  
      Returns
      -------
      if `n_samples` is `None`:
      returns a sample that contains a single sample from `self`,
      in `pd.DataFrame` mtype format convention, with `index` and `columns` as `self`
      if n_samples is `int`:
      returns a `pd.DataFrame` that contains `n_samples` i.i.d. samples from `self`,
      in `pd-multiindex` mtype format convention, with same `columns` as `self`,
      and `MultiIndex` that is product of `RangeIndex(n_samples)` and `self.index`
      """
      if n_samples is None:
          np_spl = self.distr.sample().numpy()
          return pd.DataFrame(
              np_spl, index=self.index, columns=self.columns
          )
      else:
          np_spl = self.distr.sample(n_samples).numpy()
          np_spl = np_spl.reshape(-1, np_spl.shape[-1])
          mi = _prod_multiindex(range(n_samples), self.index)
          df_spl = pd.DataFrame(np_spl, index=mi, columns=self.columns)
          return df_spl
  
imports: from warnings import warn
  import numpy
  import pandas
  from sktime.base import BaseObject
  from sktime.utils.pandas import df_map
  from sktime.utils.validation._dependencies import _check_estimator_deps
label_desc: Use image node_id 6 for calling the _BaseTFDistribution obj's underlying member method code with example usage: obj.sample(n_samples) and returns: pd, df_spl