code: def _checkisfit(self):
      try:
          self.density
      except Exception:
          raise ValueError("Call fit to fit the density first")
  
file_path: statsmodels/statsmodels/nonparametric/kde.py
imports: import numpy
  from scipy import integrate, stats
  from statsmodels.sandbox.nonparametric import kernels
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.tools.validation import array_like, float_like
  from .None import bandwidths
  from .kdetools import forrt, revrt, silverman_transform
  from .linbin import fast_linbin
label_desc: Use image node_id 1 for calling a global function with example usage: _checkisfit() without return types