code: def _test_args_subset(
      test_params, expected_params, expected_params_present, args_func
  ):
      """
      Only checks the subset of the parameters given in `expected_params`.
  
      :param test_params: A string of test parameters.
      :param expected_params: A dict of parameters to test for the exact value.
      :param expected_params_present: A dict of parameters to test for presence.
      :param args_func: The function correctly setting up the parameters for ArgumentParser.
      """
      test_parser = argparse.ArgumentParser()
      args_func(test_parser)
      created = _create_argument_values_that_must_be_files_or_dirs(
          test_params
      )
      parsed_params = dict(
          vars(test_parser.parse_args(test_params.split()))
      )
      _delete_argument_values_that_must_be_files_or_dirs(created)
      parsed_params_subset = {
          k: v for k, v in parsed_params.items() if k in expected_params
      }
      assert parsed_params_subset == expected_params
      for expected_param_present in expected_params_present:
          assert expected_param_present in parsed_params, (
              "Expected param %s to be present."
              % expected_param_present
          )
  
imports: import argparse
  import pytest
  import tempfile
  import os
  import re
  import sockeye.arguments
  import sockeye.constants
  from itertools import zip_longest
label_desc: Use image node_id 16 for calling a global function with example usage: _test_args_subset(test_params, expected_params, expected_params_present, args_func) without return types