def UnitStringIsValid(unit: str) -> bool:
  """Checks to make sure that a given string is in fact a recognized unit used
      by the chromium perftests to report results.

  Args:
    unit (str): The unit string to be checked.

  Returns:
    bool: Whether or not it is a unit.
  """
  accepted_units = [
      "us/hop", "us/task", "ns/sample", "ms", "s", "count", "KB", "MB/s", "us"
  ]
  return unit in accepted_units