code: def is_valid_group(maybe_group: str) -> bool:
      """A group identifier must contain group type, followed by one or more .-separated indices, and any ?metadata"""
      return bool(GROUP_PATTERN.fullmatch(maybe_group))
  
file_path: hivemind/hivemind/averaging/key_manager.py
imports: import random
  import re
  from typing import List, Optional, Tuple
  import numpy
  from hivemind.averaging.group_info import GroupInfo
  from hivemind.dht import DHT
  from hivemind.p2p import PeerID
  from hivemind.utils import DHTExpiration, get_logger
label_desc: Use image node_id 1 for calling a global function with example usage: is_valid_group(maybe_group) and returns: bool