@staticmethod
def __add_jsr_elements(children, req, get_from_config=True):
    '\n        :type children: etree.Element\n        :type req: Request\n        '
    jsrs = []
    if get_from_config:
        jsrs = req.config.get('jsr223', [])
    else:
        jsrs = req.get('jsr223', [])
    if (not isinstance(jsrs, list)):
        jsrs = [jsrs]
    for (idx, _) in enumerate(jsrs):
        jsr = ensure_is_dict(jsrs, idx, sub_key='script-text')
        lang = jsr.get('language', 'groovy')
        script_file = jsr.get('script-file', None)
        script_text = jsr.get('script-text', None)
        if ((not script_file) and (not script_text)):
            raise TaurusConfigError("jsr223 element must specify one of 'script-file' or 'script-text'")
        parameters = jsr.get('parameters', '')
        execute = jsr.get('execute', 'after')
        cache_key = str(jsr.get('compile-cache', True)).lower()
        children.append(JMX._get_jsr223_element(lang, script_file, parameters, execute, script_text, cache_key))
        children.append(etree.Element('hashTree'))
:type children: etree.Element
:type req: Request
@staticmethod
def __add_jsr_elements(children, req, get_from_config=True):
    '\n        :type children: etree.Element\n        :type req: Request\n        '
    jsrs = []
    if get_from_config:
        jsrs = req.config.get('jsr223', [])
    else:
        jsrs = req.get('jsr223', [])
    if (not isinstance(jsrs, list)):
        jsrs = [jsrs]
    for (idx, _) in enumerate(jsrs):
        jsr = ensure_is_dict(jsrs, idx, sub_key='script-text')
        lang = jsr.get('language', 'groovy')
        script_file = jsr.get('script-file', None)
        script_text = jsr.get('script-text', None)
        if ((not script_file) and (not script_text)):
            raise TaurusConfigError("jsr223 element must specify one of 'script-file' or 'script-text'")
        parameters = jsr.get('parameters', )
        execute = jsr.get('execute', 'after')
        cache_key = str(jsr.get('compile-cache', True)).lower()
        children.append(JMX._get_jsr223_element(lang, script_file, parameters, execute, script_text, cache_key))
        children.append(etree.Element('hashTree'))