def METHOD_NAME(bug_information):
  """Retrieve testcase based on its bug information."""
  candidates = list(
      data_types.Testcase.query(
          data_types.Testcase.bug_information == bug_information))
  if not candidates:
    print('No candidate found when '
          'querying bug information {bug_information}\n')
  elif len(candidates) > 1:
    print('Multiple candidates found when '
          f'querying bug information {bug_information}:\n')
    for testcase in candidates:
      print(f'  {testcase.key.id()}')
  else:
    return candidates[0]
  return None