@staticmethod
def _get_task_requirement(task, reqname, default):
    """
        Return attribute `reqname` of `task`.

        If the attribute is not set or is ``None``, then return `default`
        instead.
        """
    return getattr(task, reqname, default)
