class_docstr: Base class for all model outputs as dataclass. Has a `__getitem__` that allows indexing by integer or slice (like a
  tuple) or strings (like a dictionary) that will ignore the `None` attributes. Otherwise behaves like a regular
  python dictionary.
  
  <Tip warning={true}>
  
  You can't unpack a `ModelOutput` directly. Use the [`~utils.ModelOutput.to_tuple`] method to convert it to a tuple
  before.
  
  </Tip>
class_docstr_tok: ["Base","class","for","all","model","outputs","as","dataclass",".","Has","a","`","__getitem__","`","that","allows","indexing","by","integer","or","slice","(","like","a","tuple",")","or","strings","(","like","a","dictionary",")","that","will","ignore","the","`","None","`","attributes",".","Otherwise","behaves","like","a","regular","python","dictionary",".","<","Tip","warning=","{","true","}",">","You","ca","n't","unpack","a","`","ModelOutput","`","directly",".","Use","the","[","`","~utils.ModelOutput.to_tuple","`","]","method","to","convert","it","to","a","tuple","before",".","<","\/Tip",">"]
code: def update(self, *args, **kwargs):
      raise Exception(
          f"You cannot use ``update`` on a {self.__class__.__name__} instance."
      )
  
imports: import inspect
  import tempfile
  from collections import OrderedDict, UserDict
  from collections.abc import MutableMapping
  from contextlib import ExitStack, contextmanager
  from dataclasses import fields
  from enum import Enum
  from typing import Any, ContextManager, List, Tuple
  import numpy
  from .import_utils import is_flax_available, is_tf_available, is_torch_available, is_torch_fx_proxy
label_desc: Use image node_id 5 for calling the ModelOutput obj's underlying member method code with example usage: obj.update() without return types