code: def is_valid_prefix(maybe_prefix: str) -> bool:
      """An uid prefix must contain a string expert type, followed by optional numeric indices and a trailing period"""
      return bool(PREFIX_PATTERN.fullmatch(maybe_prefix))
  
imports: from __future__ import annotations
  import re
  from typing import NamedTuple, Tuple, Union
  from hivemind.p2p import PeerID
label_desc: Use image node_id 2 for calling a global function with example usage: is_valid_prefix(maybe_prefix) and returns: bool