code: def add_component_name(self, new_component_name: str) -> None:
      found_index = None
      # When the work is being named by the flow, pop its previous names
      for index, component_name in enumerate(self.component_names):
          if new_component_name.endswith(
              component_name.replace("root.", "")
          ):
              found_index = index
  
      if found_index is not None:
          self.component_names[found_index] = new_component_name
      else:
          if (
              len(self.component_names) == 1
              and not ENABLE_MULTIPLE_WORKS_IN_NON_DEFAULT_CONTAINER
              and self.id != "default"
          ):
              raise Exception(
                  f"A Cloud Compute can be assigned only to a single Work. Attached to {self.component_names[0]}"
              )
          self.component_names.append(new_component_name)
  
file_path: pytorch-lightning/src/lightning/app/utilities/packaging/cloud_compute.py
imports: from dataclasses import asdict, dataclass
  from typing import Dict, List, Optional, Tuple, Union
  from uuid import uuid4
  from lightning.app.core.constants import ENABLE_MULTIPLE_WORKS_IN_NON_DEFAULT_CONTAINER, enable_interruptible_works
  from lightning.app.storage.mount import Mount
label_desc: Use image node_id 1 for calling the _CloudComputeStore obj's underlying member method code with example usage: obj.add_component_name(new_component_name) without return types