def METHOD_NAME(test_output):
  """Parses the test output and returns samples."""
  results = []
  match = re.search('Command line used: (.*)', test_output)
  if not match:
    raise errors.Benchmarks.RunError(f'Error parsing "{test_output}"')
  command_line = match.group(1).strip()
  dir_per_task = '-u' in command_line
  summaries = re.findall(_MDTEST_SUMMARY_REGEX, test_output, re.DOTALL)
  for num_tasks, num_files, summary in summaries:
    metadata = {
        'command_line': command_line, 'num_tasks': num_tasks,
        'drop_caches': FLAGS.mdtest_drop_caches,
        'num_files': num_files, 'dir_per_task': dir_per_task
    }
    result_lines = re.findall(_MDTEST_RESULT_REGEX, summary)
    for result_line in result_lines:
      op_type, max_ops, min_ops, mean_ops, std_dev = result_line
      if not float(mean_ops):
        continue
      results.append(sample.Sample(
          op_type + ' (Mean)', float(mean_ops), 'OPs/s', metadata))
      if float(std_dev):
        results.extend([
            sample.Sample(
                op_type + ' (Max)', float(max_ops), 'OPs/s', metadata),
            sample.Sample(
                op_type + ' (Min)', float(min_ops), 'OPs/s', metadata),
            sample.Sample(
                op_type + ' (Std Dev)', float(std_dev), 'OPs/s', metadata)
        ])
  return results