code: def replace_variable(self, variable):
          
          name = variable.__name__
          if self.variables.get(name) is not None:
              del self.variables[name]
          self.load_variable(variable, update = False)
docs: Replaces an existing OpenFisca variable in the tax and benefit system by a new one.
  
          The new variable must have the same name than the replaced one.
  
          If no variable with the given name exists in the tax and benefit system, no error will be raised and the new variable will be simply added.
  
          :param Variable variable: New variable to add. Must be a subclass of Variable.