def _CreateUserTestsResults(run_user_tests, stdio_tests_dict):
  """Create dictionary of tests results for all user-specified tests.

  If a user test is in the build status given by |stdio_tests_dict|, then
  use the test result stored in |stdio_tests_dict|. Otherwise, set the test
  test result to 'Missing'.

  Args:
    run_user_tests: List of run instances of user specified tests.
    stdio_tests_dict: builder's results.json test results.

  Returns:
    Dictionary of tests and results for all user specified tests.
  """
  user_tests_results_dict = {}
  # Iterate over tests in the run user-specified tests list.
  for test_name in run_user_tests:
    if test_name in stdio_tests_dict:  # Use result from builder results.json.
      test_result = stdio_tests_dict[test_name]
    else:
      test_result = 'Missing'  # Set result to missing.
    user_tests_results_dict[test_name] = test_result
  return user_tests_results_dict