## Script (Python) "test_required"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=field
##title=tests if a field if required
##

try:
    return field.get_value("required")
except KeyError:
    return 0
