code: def _get_max_feature_index(feature_mask: Tuple[Tensor, ...]):
      """
      Returns the max feature mask index
      The feature mask should be formatted to tuple of tensors at first.
  
      Note: This util is commonly used to identify the number of features (max_index + 1),
      as we expect user to be resposible to ensure consecutive feature mask indices from 0
      """
  
      return int(
          max(
              torch.max(mask).item()
              for mask in feature_mask
              if mask.numel()
          )
      )
  
imports: import typing
  from enum import Enum
  from functools import reduce
  from inspect import signature
  from typing import Any, Callable, cast, Dict, List, overload, Tuple, Union
  import numpy
  import torch
  from captum._utils.typing import BaselineType, Literal, TargetType, TensorOrTupleOfTensorsGeneric, TupleOrTensorOrBoolGeneric
  from torch import device, Tensor
  from torch.nn import Module
label_desc: Use image node_id 47 for calling a global function with example usage: _get_max_feature_index(feature_mask) and returns: int