def __init__(self, scheme):
    if hasattr(scheme, '_scheme'):
        scheme = scheme._scheme
    elif hasattr(scheme, 'scheme'):
        scheme = scheme.scheme
    self._scheme = self.assign_scheme(scheme)
def __init__(self, scheme):
    if hasattr(scheme, '_scheme'):
        scheme = scheme._scheme
    elif hasattr(scheme, 'scheme'):
        scheme = scheme.scheme
    self._scheme = self.assign_scheme(scheme)