def _filter_undesired_bots(bot_to_status_mapping, desired_bot_names):
  """Returns the desired bots for the builds status from the dictionary.

  Args:
    bot_to_status_mapping: Dictionary mapping bot name with revision to status.
    desired_bot_names: List of bot names that will be the only bots returned in
      the resulting dictionary.
  Returns: A dictionary only containing the desired bots.
  """
  result = {}
  for revision_to_bot_name, status in bot_to_status_mapping.iteritems():
    bot_name = revision_to_bot_name.split('--')[1]
    if bot_name in desired_bot_names:
      result[revision_to_bot_name] = status
  return result