code: def filter_transition_coefs(transition_coef, indices):
      """
      >>> coef = np.array([[0, 1, 2], [3, 4, 5], [6, 7, 8]])
      >>> filter_transition_coefs(coef, [0])
      array([[0]])
      >>> filter_transition_coefs(coef, [1, 2])
      array([[4, 5],
             [7, 8]])
      >>> filter_transition_coefs(coef, [2, 0])
      array([[8, 6],
             [2, 0]])
      >>> filter_transition_coefs(coef, [0, 1, 2])
      array([[0, 1, 2],
             [3, 4, 5],
             [6, 7, 8]])
      """
      indices = np.array(indices)
      rows = transition_coef[indices]
      return rows[:, indices]
  
file_path: eli5/eli5/sklearn_crfsuite/explain_weights.py
imports: from __future__ import absolute_import
  import numpy
  from scipy import sparse
  from sklearn_crfsuite import CRF
  from eli5.base import Explanation, TargetExplanation, TransitionFeatureWeights
  from eli5.explain import explain_weights
  from eli5.utils import get_target_display_names
  from eli5._feature_names import FeatureNames
  from eli5._feature_weights import get_top_features
label_desc: Use image node_id 4 for calling a global function with example usage: filter_transition_coefs(transition_coef, indices) and returns: rows