'Helper function to identify a formstyle'

def _get_formstyle(cls, setting):

    formstyles = cls.FORMSTYLE
    if callable(setting):
        formstyle = setting
    if (setting in formstyles):
        formstyle = formstyles[setting]
    else:
        formstyle = setting
    return formstyle
