docs: def clone(cls, model, use_json=True, use_lp=False):
          """
          Make a copy of a model. The model being copied can be of the same type or belong to
          a different solver interface. This is the preferred way of copying models.
  
          Example
          ----------
          >>> new_model = Model.clone(old_model)
          """
          model.update()
          interface = sys.modules[cls.__module__]
  
          if use_lp:
              warnings.warn("Cloning with LP formats can change variable and constraint ID's.")
              new_model = cls.from_lp(model.to_lp())
              new_model.configuration = interface.Configuration.clone(model.configuration, problem=new_model)
              return new_model
  
          if use_json:
              new_model = cls.from_json(model.to_json())
              new_model.configuration = interface.Configuration.clone(model.configuration, problem=new_model)
              return new_model
  
          new_model = cls()
          for variable in model.variables:
              new_variable = interface.Variable.clone(variable)
              new_model._add_variable(new_variable)
          for constraint in model.constraints:
              new_constraint = interface.Constraint.clone(constraint, model=new_model)
              new_model._add_constraint(new_constraint)
          if model.objective is not None:
              new_model.objective = interface.Objective.clone(model.objective, model=new_model)
          new_model.configuration = interface.Configuration.clone(model.configuration, problem=new_model)
          return new_model