<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def NormalizeScopes(scope_spec):
 """Normalize scope_spec to a set of strings."""

    if isinstance(scope_spec, six.string_types):
        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),))