def get_attr(entry, attr):
    """
    Return the first value for an attribute in the given entry.

    If the attribute does not exist in the entry, return `None`.
    """
    a = entry.get(attr)
    if a is not None:
        return a[0]
    else:
        return None
