parameters: (validators)
return_statement: return options
docstring: given a validator chain, if one has .options, return them
docstring_summary: given a validator chain, if one has .options, return them
docstring_tokens: given a validator chain if one has . options return them
function: 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
function_tokens: 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