code: def _generate_machine_type(self, resources_needed={}):
      if not any(resources_needed):
          machine_type = "zones/{}/machineTypes/n1-standard-1".format(
              self.zone
          )
      else:
          cpus = int(resources_needed["cpus"])
          default_ram_per_cpu = 4096
          ram = default_ram_per_cpu * cpus
  
          if "ram" in resources_needed.keys():
              ram = memstr2int(resources_needed["ram"]) / memstr2int(
                  "1Mb"
              )
              ram = int(math.ceil(ram / 256.0) * 256)
  
          ram_per_cpu = ram / cpus
          assert (
              1024 <= ram_per_cpu and ram_per_cpu <= 6192
          ), "RAM per cpu should be between 0.9 and 6.5 Gb"
  
          machine_type = "zones/{}/machineTypes/custom-{}-{}".format(
              self.zone, cpus, ram
          )
  
      return machine_type
  
imports: import os
  import time
  import googleapiclient.discovery
  import uuid
  import math
  import json
  from studio import git_util
  from studio.util import logs
  from studio.util.gpu_util import memstr2int
  from .cloud_worker_util import insert_user_startup_script
label_desc: Use image node_id 9 for calling the GCloudWorkerManager obj's underlying member method code with example usage: obj._generate_machine_type(resources_needed) and returns: machine_type