code: def azure_machine_type_to_worker_type_and_cores(
      machine_type: str,
  ) -> Tuple[str, int]:
      maybe_machine_type_parts = azure_machine_type_to_parts(
          machine_type
      )
      if maybe_machine_type_parts is None:
          raise ValueError(f"bad machine_type: {machine_type}")
      return (
          maybe_machine_type_parts.family,
          maybe_machine_type_parts.cores,
      )
  
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 3 for calling a global function with example usage: azure_machine_type_to_worker_type_and_cores(machine_type) and returns: maybe_machine_type_parts,  maybe_machine_type_parts