'Gets fields that are explicitly set on block and checks if they are marked as explicitly set or not'

def _check_explicitly_set(self, block, scope, expected_explicitly_set_fields, should_be_set=False):

    actual_explicitly_set_fields = block.get_explicitly_set_fields_by_scope(scope=scope)
    assertion = (self.assertIn if should_be_set else self.assertNotIn)
    for field in expected_explicitly_set_fields:
        assertion(field, actual_explicitly_set_fields)
