@classmethod<EOL><INDENT>def build_machine_type(cls, min_cores, min_ram):<DEDENT>
min_cores = min_cores or job_model.DEFAULT_MIN_CORES<EOL>min_ram = min_ram or job_model.DEFAULT_MIN_RAM<EOL>min_ram *= GoogleV2CustomMachine._MB_PER_GB<EOL>cores = cls._validate_cores(min_cores)<EOL>ram = cls._validate_ram(min_ram)<EOL>memory_to_cpu_ratio = ram / cores<EOL>if memory_to_cpu_ratio < GoogleV2CustomMachine._MIN_MEMORY_PER_CPU:<EOL><INDENT>adjusted_ram = GoogleV2CustomMachine._MIN_MEMORY_PER_CPU * cores<EOL>ram = cls._validate_ram(adjusted_ram)<EOL><DEDENT>elif memory_to_cpu_ratio > GoogleV2CustomMachine._MAX_MEMORY_PER_CPU:<EOL><INDENT>adjusted_cores = math.ceil(<EOL>ram / GoogleV2CustomMachine._MAX_MEMORY_PER_CPU)<EOL>cores = cls._validate_cores(adjusted_cores)<EOL><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT>return '<STR_LIT>'.format(int(cores), int(ram))<EOL>
Returns a custom machine type string.