def NormalizeScopes(scope_spec):
    'Normalize scope_spec to a set of strings.'
    if isinstance(scope_spec, types.StringTypes):
        return set(scope_spec.split(' '))
    elif isinstance(scope_spec, collections.Iterable):
        return set(scope_spec)
    raise exceptions.TypecheckError(('NormalizeScopes expected string or iterable, found %s' % (type(scope_spec),)))
Normalize scope_spec to a set of strings.
def NormalizeScopes(scope_spec):
    
    if isinstance(scope_spec, types.StringTypes):
        return set(scope_spec.split(' '))
    elif isinstance(scope_spec, collections.Iterable):
        return set(scope_spec)
    raise exceptions.TypecheckError(('NormalizeScopes expected string or iterable, found %s' % (type(scope_spec),)))