class_docstr: Stores data associated with and proxies calls to a Stan model.
  
  Returned by ``build``. Users will not instantiate this class directly.
class_docstr_tok: ["Stores","data","associated","with","and","proxies","calls","to","a","Stan","model",".","Returned","by","``","build","``",".","Users","will","not","instantiate","this","class","directly","."]
docstr: Transform a sequence of unconstrained parameters to their defined support,
     optionally including transformed parameters and generated quantities.
  
  Arguments:
      unconstrained_parameters: A sequence of unconstrained parameters.
      include_tparams: Boolean to control whether we include transformed parameters.
      include_gqs: Boolean to control whether we include generated quantities.
  
  Returns:
      A sequence of constrained parameters, optionally including transformed parameters.
  
  Note:
      The unconstrained parameters are passed to the `write_array` method of the `model_base`
      instance. See `model_base.hpp` in the Stan C++ library for details.
docstr_tok: ["Transform","a","sequence","of","unconstrained","parameters","to","their","defined","support",",","optionally","including","transformed","parameters","and","generated","quantities",".","Arguments",":","unconstrained_parameters",":","A","sequence","of","unconstrained","parameters",".","include_tparams",":","Boolean","to","control","whether","we","include","transformed","parameters",".","include_gqs",":","Boolean","to","control","whether","we","include","generated","quantities",".","Returns",":","A","sequence","of","constrained","parameters",",","optionally","including","transformed","parameters",".","Note",":","The","unconstrained","parameters","are","passed","to","the","`","write_array","`","method","of","the","`","model_base","`","instance",".","See","`","model_base.hpp","`","in","the","Stan","C++","library","for","details","."]
code: def constrain_pars(
      self,
      unconstrained_parameters: Sequence[float],
      include_tparams: bool = True,
      include_gqs: bool = True,
  ) -> Sequence[float]:
      """Transform a sequence of unconstrained parameters to their defined support,
         optionally including transformed parameters and generated quantities.
  
      Arguments:
          unconstrained_parameters: A sequence of unconstrained parameters.
          include_tparams: Boolean to control whether we include transformed parameters.
          include_gqs: Boolean to control whether we include generated quantities.
  
      Returns:
          A sequence of constrained parameters, optionally including transformed parameters.
  
      Note:
          The unconstrained parameters are passed to the `write_array` method of the `model_base`
          instance. See `model_base.hpp` in the Stan C++ library for details.
      """
      payload = {
          "data": self.data,
          "unconstrained_parameters": unconstrained_parameters,
          "include_tparams": include_tparams,
          "include_gqs": include_gqs,
      }
  
      async def go():
          async with stan.common.HttpstanClient() as client:
              resp = await client.post(
                  f"/{self.model_name}/write_array", json=payload
              )
              if resp.status != 200:
                  raise RuntimeError(resp.json())
              return resp.json()["params_r_constrained"]
  
      return asyncio.run(go())
  
imports: import asyncio
  import dataclasses
  import json
  import re
  import time
  from typing import Dict, List, Optional, Sequence, Tuple, Union, cast
  import httpstan.models
  import httpstan.schemas
  import httpstan.services.arguments
  import httpstan.utils
  import numpy
  import simdjson
  from clikit.io import ConsoleIO
  import stan.common
  import stan.fit
  import stan.plugins
label_desc: Use image node_id 6 for calling the Model obj's underlying member method code with example usage: obj.constrain_pars(unconstrained_parameters, include_tparams, include_gqs) and returns: asyncio, resp