code: def from_dict(data: dict) -> "MachineTypeParts":
      constrained_cpu = data["constrained_cpu"]
      if constrained_cpu is not None:
          constrained_cpu = int(constrained_cpu)
      return MachineTypeParts(
          data["typ"],
          data["family"],
          data["sub_family"],
          int(data["cpu"]),
          constrained_cpu,
          data["additive_features"],
          data["accelerator_type"],
          data["version"],
      )
  
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 1 for calling the MachineTypeParts obj's underlying member method code with example usage: obj.from_dict(data) and returns: MachineTypeParts