def _parse_mode(self, config):
        value = re.search(r'switchport mode (\w+)', config, re.M)
        return dict(mode=value.group(1))
Scans the specified config and parses the switchport mode value
dataset/ETHPy150Open arista-eosplus/pyeapi/pyeapi/api/switchports.py/Switchports._parse_mode