code: def _has_capability(distr, method):
      """Check whether distr has capability of method.
  
      Parameters
      ----------
      distr : BaseDistribution object
      method : str
          method name to check
  
      Returns
      -------
      whether distr has capability method, according to tags
      capabilities:approx and capabilities:exact
      """
      approx_methods = distr.get_tag("capabilities:approx")
      exact_methods = distr.get_tag("capabilities:exact")
      return method in approx_methods or method in exact_methods
  
imports: import numpy
  import pandas
  import pytest
  from sktime.datatypes import check_is_mtype
  from sktime.tests.test_all_estimators import BaseFixtureGenerator, QuickTester
  from sktime.utils.index import random_ss_ix
label_desc: Use image node_id 1 for calling a global function with example usage: _has_capability(distr, method) and returns: unknown