code: def _validate_function_args(function, required_args):
      """Asserts all of the `required_args` are presented in `function` args.
  
      Args:
        function: (function) A python function.
        required_args: (list) A list of strings indicating the required args.
  
      Raises:
        ValueError: If any of `required_args` does not present in the `function`.
      """
      fn_args = function_utils.fn_args(function)
      if set(fn_args) != set(required_args):
          raise ValueError(
              "Function `%s` needs to have the following arguments: %s."
              " What were provided are the following: %s."
              % (
                  function.__name__,
                  sorted(required_args),
                  sorted(fn_args),
              )
          )
  
imports: import tensorflow
  from tensorflow import estimator
  from tensorflow.python.util import function_utils
  from tensorflow_ranking.python import feature
  from tensorflow_ranking.python import head
  from tensorflow_ranking.python import losses
  from tensorflow_ranking.python import metrics
  from tensorflow_ranking.python import model
  from tensorflow_ranking.python import utils
label_desc: Use image node_id 2 for calling a global function with example usage: _validate_function_args(function, required_args) without return types