code: def _parse_resources(resource_values: dict, resource_name: str) -> dict:
          
          # Initialising empty dictionary
          resources = {}
  
          for r_values in resource_values[resource_name]:
              if 'limits' in r_values:
                  for r_key, r_value in \
                          resource_values[resource_name][r_values].items():
                      if 'cpu' in r_key:
                          cpu_value = float(r_value) * 10 ** 9
                          cpu_key = r_key[:3] + '_limit'
                          resources[cpu_key] = int(cpu_value)
                      if 'mem' in r_key:
                          mem_value = re.sub('M', '', r_value)
                          mem_key = r_key[:3] + '_limit'
                          resources[mem_key] = int(mem_value) * 1048576
          resources_spec = docker.types.Resources(**resources)
  
          return resources_spec
docs: Parse resources key.
  
          Args:
              resource_values (dict): resource configurations values
              resource_name (string): Resource name
  
          Returns:
              dict, resources specification