code: def BindScope(self, scope_id, values):
      
      if scope_id not in self._scopes:
        raise KeyError(scope_id)
  
      keys = set(iterkeys(values))
      if keys != self._scopes[scope_id]:
        raise KeyError(keys ^ self._scopes[scope_id])
  
      self._scope_bindings[scope_id].append(values)
docs: Associates given values with given scope.
  
      This can be called multiple times to associate multiple values.
  
      Args:
        scope_id: A scope id to bind the values to.
        values: A mapping from scope variable ids to values to bind in scope.
  
      Raises:
        KeyError: If given scope or scope variable is not specified in the
          pattern.