class_docstr: Base ModelOutput class fixing the output type from the models. This class is inspired from
  the ``ModelOutput`` class from hugginface transformers library
class_docstr_tok: ["Base","ModelOutput","class","fixing","the","output","type","from","the","models",".","This","class","is","inspired","from","the","``","ModelOutput","``","class","from","hugginface","transformers","library"]
code: def __getitem__(self, k):
      if isinstance(k, str):
          self_dict = {k: v for (k, v) in self.items()}
          return self_dict[k]
      else:
          return self.to_tuple()[k]
  
file_path: benchmark_VAE/src/pythae/models/base/base_utils.py
imports: import importlib
  import io
  import logging
  from collections import OrderedDict
  from typing import Any, Tuple
  import torch
label_desc: Use image node_id 1 for calling the ModelOutput obj's underlying member method code with example usage: obj.__getitem__(k) and returns: self_dict, self