code: def mean(self, axis=None) -> "FeatureImportanceResult":
      mean_dict = {}
      for key, val in self.dict().items():
          mean_dict[key] = (
              np.mean(val, axis=axis).tolist() if val else []
          )
      return FeatureImportanceResult(**mean_dict)
  
file_path: gluonts/src/gluonts/ext/rotbaum/_types.py
imports: from typing import List, Union, Optional
  import numpy
  from gluonts.pydantic import BaseModel, root_validator
label_desc: Use image node_id 2 for calling the FeatureImportanceResult obj's underlying member method code with example usage: obj.mean(axis) and returns: FeatureImportanceResult