def METHOD_NAME(self, name: str) -> None:
    """
    Destroy a device mesh by name.
    Args:
        name (str): name of the device mesh
    """
    if name in self.device_mesh_store:
        for pgs in self.device_mesh_store[name].process_groups_dict.values():
            for pg in pgs:
                dist.destroy_process_group(pg)
        del self.device_mesh_store[name]
    else:
        raise ValueError(f'Device mesh {name} does not exist.')