code: def _maybe_update_model_overview_meta(
      metadata, cpn, config: "TaskConfigSpec"
  ):
      from fate.components.core.spec.artifact import ModelOutputMetadata
      from fate.components.core.spec.model import (
          MLModelComponentSpec,
          MLModelFederatedSpec,
          MLModelPartiesSpec,
          MLModelPartySpec,
          MLModelSpec,
      )
  
      if not isinstance(metadata, ModelOutputMetadata):
          return
  
      metadata.model_overview = MLModelSpec(
          federated=MLModelFederatedSpec(
              task_id=config.task_id,
              parties=MLModelPartiesSpec(
                  guest=[
                      p.partyid
                      for p in config.conf.federation.metadata.parties.parties
                      if p.role == "guest"
                  ],
                  host=[
                      p.partyid
                      for p in config.conf.federation.metadata.parties.parties
                      if p.role == "host"
                  ],
                  arbiter=[
                      p.partyid
                      for p in config.conf.federation.metadata.parties.parties
                      if p.role == "arbiter"
                  ],
              ),
              component=MLModelComponentSpec(
                  name=cpn.name,
                  provider=cpn.provider,
                  version=cpn.version,
                  metadata={},
              ),
          ),
          party=MLModelPartySpec(
              party_task_id=config.party_task_id,
              role=config.role,
              partyid=config.party_id,
              models=[],
          ),
      )
  
imports: import logging
  import typing
  from typing import Dict, Generic, List, Optional, Union
  from fate.components.core.essential import Role, Stage
  from .artifacts._base_type import AT, MM, ArtifactDescribe, M, _ArtifactsType, _ArtifactType
label_desc: Use image node_id 2 for calling a global function with example usage: _maybe_update_model_overview_meta(metadata, cpn, config) without return types