def is_language(value):

    if value is None:
        return

    if not isinstance(value, str) or len(value) != 2:
        return c('language')
Initialize the switch.
dataset/ETHPy150Open heiskr/sagefy/server/modules/validations.py/is_language--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/switch/arest.py/ArestSwitchFunction.__init__