@ref.setter
def ref(self, value):
    if isinstance(value, str):
        value = value.lower()
    if (value in ['local', 'remote', None]):
        self._ref = value
    else:
        raise ValueError("ref can only be 'local' or 'remote'")
@ref.setter
def ref(self, value):
    if isinstance(value, str):
        value = value.lower()
    if (value in ['local', 'remote', None]):
        self._ref = value
    else:
        raise ValueError("ref can only be 'local' or 'remote'")