docstr: Parameters
  ----------
  partial_index
      Get the result coverage until a certain index.
      For example, if the result has precisions ``[0.1, 0.5, 0.95]`` and ``partial_index=1``, this will
      return ``0.5``.
  
  Returns
  -------
  coverage
      Anchor coverage.
code: def coverage(self, partial_index: Optional[int] = None) -> float:
      """
      Parameters
      ----------
      partial_index
          Get the result coverage until a certain index.
          For example, if the result has precisions ``[0.1, 0.5, 0.95]`` and ``partial_index=1``, this will
          return ``0.5``.
  
      Returns
      -------
      coverage
          Anchor coverage.
      """
      coverage = self.exp_map["coverage"]
      if len(coverage) == 0:
          return 1
      if partial_index is not None:
          return coverage[partial_index]
      else:
          return coverage[-1]
  
file_path: alibi/alibi/explainers/anchors/anchor_explanation.py
imports: from typing import Optional, Union
  import numpy
label_desc: Use image node_id 5 for calling the AnchorExplanation obj's underlying member method code with example usage: obj.coverage(partial_index) and returns: int, coverage, coverage