import collections


def DictFilter(alist, bits):
  """Translates bits from EDID into a list of strings.

  Args:
    alist: A list of tuples, with the first being a number and second a string.
    bits: The bits from EDID that indicate whether each string is supported by
        this EDID or not.

  Returns:
    A dict of strings and bools.
  """
  d = collections.OrderedDict()
  for x, s in alist:
    d[s] = bool(bits & x)
  return d