code: def NormalizeScopes(scope_spec):
      
      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),))
docs: Normalize scope_spec to a set of strings.