def _has_restrictions(ts):
    'Determine whether the given task has restrictions and whether these\n    restrictions are strict.\n    '
    return ((not ts.loose_restrictions) and (ts.host_restrictions or ts.worker_restrictions or ts.resource_restrictions))
Determine whether the given task has restrictions and whether these
restrictions are strict.
def _has_restrictions(ts):
    'Determine whether the given task has restrictions and whether these\n    restrictions are strict.\n    '
    return ((not ts.loose_restrictions) and (ts.host_restrictions or ts.worker_restrictions or ts.resource_restrictions))