code: def _convert_to_resource_requirements(
      resources: infra_validator_pb2.Resources,
  ) -> k8s_client.V1ResourceRequirements:
      return k8s_client.V1ResourceRequirements(
          requests=dict(resources.requests),
          limits=dict(resources.limits),
      )
  
imports: import datetime
  import os
  import time
  from typing import Optional
  from absl import logging
  from apache_beam.utils import retry
  from kubernetes import client
  from kubernetes.client import rest
  from tfx.components.infra_validator import error_types
  from tfx.components.infra_validator import serving_bins
  from tfx.components.infra_validator.model_server_runners import base_runner
  from tfx.proto import infra_validator_pb2
  from tfx.utils import kube_utils
label_desc: Use image node_id 5 for calling a global function with example usage: _convert_to_resource_requirements(resources) and returns: k8s_client