code: def azure_machine_type_to_parts(
      machine_type: str,
  ) -> Optional[MachineTypeParts]:
      match = MACHINE_TYPE_REGEX.fullmatch(machine_type)
      if match is None:
          return match
      return MachineTypeParts.from_dict(match.groupdict())
  
imports: import logging
  import re
  from typing import Dict, Optional, Tuple
  import sortedcontainers
  from ...globals import RESERVED_STORAGE_GB_PER_CORE
label_desc: Use image node_id 2 for calling a global function with example usage: azure_machine_type_to_parts(machine_type) and returns: MachineTypeParts, match