(validators)
return options
given a validator chain, if one has .options, return them
given a validator chain, if one has .options, return them
given a validator chain if one has . options return them
def get_options(validators):
    """given a validator chain, if one has .options, return them"""
    options = None
    if validators:
        if not isinstance(validators, (list, tuple)):
            validators = [validators]
        for item in validators:
            if hasattr(item, "options"):
                options = item.options
                break
        if callable(options):
            options = options()
    return options
def get_options ( validators ) : options = None if validators : if not isinstance ( validators , ( list , tuple ) ) : validators = [ validators ] for item in validators : if hasattr ( item , "options" ) : options = item . options break if callable ( options ) : options = options ( ) return options