code: def add_object(self, obj):
          
          self.objects[obj.id] = obj
          self.all_objects[obj.id] = obj
          child_stack = list(obj.children)
          while child_stack:
              child = child_stack.pop()
              self.all_objects[child.id] = child
              child_stack.extend(getattr(child, "children", ()))
docs: Add object to local and app environment storage
  
          :param obj: Instance of a AutoAPI object