code: def update_roles_and_stages(self, stages, roles):
      def _set_all(artifacts: Dict[str, "AllowArtifactDescribes"]):
          for _, artifact in artifacts.items():
              artifact.update_stages(stages)
              artifact.update_roles(roles)
  
      _set_all(self.data_inputs)
      _set_all(self.model_inputs)
      _set_all(self.data_outputs)
      _set_all(self.model_outputs)
      _set_all(self.metric_outputs)
  
imports: import typing
  from typing import Dict, List, Type, Union
label_desc: Use image node_id 4 for calling the ComponentArtifactDescribes obj's underlying member method code with example usage: obj.update_roles_and_stages(stages, roles) without return types