code: def _get_set_or_delete(self, id, operation, new_item=None):
      _check_if_has_indexable_children(self)
  
      # pylint: disable=access-member-before-definition,
      # pylint: disable=attribute-defined-outside-init
      if isinstance(self.children, Component):
          if getattr(self.children, "id", None) is not None:
              # Woohoo! It's the item that we're looking for
              if self.children.id == id:
                  if operation == "get":
                      return self.children
                  if operation == "set":
                      self.children = new_item
                      return
                  if operation == "delete":
                      self.children = None
                      return
  
          # Recursively dig into its subtree
          try:
              if operation == "get":
                  return self.children.__getitem__(id)
              if operation == "set":
                  self.children.__setitem__(id, new_item)
                  return
              if operation == "delete":
                  self.children.__delitem__(id)
                  return
          except KeyError:
              pass
  
      # if children is like a list
      if isinstance(self.children, (tuple, MutableSequence)):
          for i, item in enumerate(self.children):
              # If the item itself is the one we're looking for
              if getattr(item, "id", None) == id:
                  if operation == "get":
                      return item
                  if operation == "set":
                      self.children[i] = new_item
                      return
                  if operation == "delete":
                      del self.children[i]
                      return
  
              # Otherwise, recursively dig into that item's subtree
              # Make sure it's not like a string
              elif isinstance(item, Component):
                  try:
                      if operation == "get":
                          return item.__getitem__(id)
                      if operation == "set":
                          item.__setitem__(id, new_item)
                          return
                      if operation == "delete":
                          item.__delitem__(id)
                          return
                  except KeyError:
                      pass
  
      # The end of our branch
      # If we were in a list, then this exception will get caught
      raise KeyError(id)
  
imports: import abc
  import collections
  import inspect
  import sys
  import uuid
  import random
  from .._utils import patch_collections_abc, stringify_id, OrderedSet
label_desc: Use image node_id 4 for calling the Component obj's underlying member method code with example usage: obj._get_set_or_delete(id, operation, new_item) and returns: self, self, item, item