code: def to_int(*names, **kwargs):
      
  
      return reduce(lambda prev, next: (prev | SCOPE_NAME_DICT.get(next, 0)),
              names, kwargs.pop('default', 0))
docs: Turns a list of scope names into an integer value.
  
      ::
  
          >>> scope.to_int('read')
          2
          >>> scope.to_int('write')
          6
          >>> scope.to_int('read', 'write')
          6
          >>> scope.to_int('invalid')
          0
          >>> scope.to_int('invalid', default = 1)
          1