def get_resources(resources):  
limits = {}<EOL>requests = {}<EOL>if resources is None:<EOL><INDENT>return None<EOL><DEDENT>if resources.cpu:<EOL><INDENT>if resources.cpu.limits:<EOL><INDENT>limits['<STR_LIT>'] = resources.cpu.limits<EOL><DEDENT>if resources.cpu.requests:<EOL><INDENT>requests['<STR_LIT>'] = resources.cpu.requests<EOL><DEDENT><DEDENT>if resources.memory:<EOL><INDENT>if resources.memory.limits:<EOL><INDENT>limits['<STR_LIT>'] = '<STR_LIT>'.format(resources.memory.limits)<EOL><DEDENT>if resources.memory.requests:<EOL><INDENT>requests['<STR_LIT>'] = '<STR_LIT>'.format(resources.memory.requests)<EOL><DEDENT><DEDENT>if resources.gpu:<EOL><INDENT>if resources.gpu.limits:<EOL><INDENT>limits[conf.get('<STR_LIT>')] = resources.gpu.limits<EOL><DEDENT>if resources.gpu.requests:<EOL><INDENT>requests[conf.get('<STR_LIT>')] = resources.gpu.requests<EOL><DEDENT><DEDENT>if resources.tpu:<EOL><INDENT>if resources.tpu.limits:<EOL><INDENT>limits[conf.get('<STR_LIT>')] = resources.tpu.limits<EOL><DEDENT>if resources.tpu.requests:<EOL><INDENT>requests[conf.get('<STR_LIT>')] = resources.tpu.requests<EOL><DEDENT><DEDENT>return client.V1ResourceRequirements(limits=limits or None, requests=requests or None)<EOL>
Create resources requirements.

    Args:
        resources: `PodResourcesConfig`

    Return:
        `V1ResourceRequirements`