docstr: TODO: how to add constraints?
  
  Something like
  sm.add_constraint(Model, func)
  
  or
  
  model_instance.add_constraint(func)
  model_instance.add_constraint("x1 + x2 = 2")
  result = model_instance.fit()
docstr_tok: ["TODO",":","how","to","add","constraints","?","Something","like","sm.add_constraint","(","Model",",","func",")","or","model_instance.add_constraint","(","func",")","model_instance.add_constraint","(","``","x1","+","x2","=","2","''",")","result","=","model_instance.fit","(",")"]
code: def _fit_constrained(self, params):
      """
      TODO: how to add constraints?
  
      Something like
      sm.add_constraint(Model, func)
  
      or
  
      model_instance.add_constraint(func)
      model_instance.add_constraint("x1 + x2 = 2")
      result = model_instance.fit()
      """
      raise NotImplementedError
  
imports: from __future__ import annotations
  from statsmodels.compat.scipy import SP_LT_15, SP_LT_17
  from typing import Any
  from collections.abc import Sequence
  import numpy
  from scipy import optimize
label_desc: Use image node_id 2 for calling the Optimizer obj's underlying member method code with example usage: obj._fit_constrained(params) without return types