code: def to_names(scope):
      
      return [
          name
          for (name, value) in SCOPE_NAME_DICT.iteritems()
          if check(value, scope)
      ]
docs: Returns a list of scope names as defined in
      :attr:`provider.constants.SCOPES` for a given scope integer.
  
          >>> assert ['read', 'write'] == provider.scope.names(provider.constants.READ_WRITE)