<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_optional(attr):
 """ Helper method to find if an attribute is mandatory :param attr: :return: """

    return isinstance(attr.validator, _OptionalValidator) or (attr.default is not None and attr.default is not NOTHING)