@staticmethod<EOL><INDENT>def _get_block_by_name(ref_call, ref_type):<DEDENT>
function_meta = parse_function(ref_call)<EOL>func_name = function_meta["<STR_LIT>"]<EOL>call_args = function_meta["<STR_LIT:args>"]<EOL>block = YamlCaseLoader._get_test_definition(func_name, ref_type)<EOL>def_args = block.get("<STR_LIT>").get("<STR_LIT:args>", [])<EOL>if len(call_args) != len(def_args):<EOL><INDENT>raise p_exception.ParamsError("<STR_LIT>")<EOL><DEDENT>args_mapping = {}<EOL>for index, item in enumerate(def_args):<EOL><INDENT>if call_args[index] == item:<EOL><INDENT>continue<EOL><DEDENT>args_mapping[item] = call_args[index]<EOL><DEDENT>if args_mapping:<EOL><INDENT>block = substitute_variables_with_mapping(block, args_mapping)<EOL><DEDENT>return block<EOL>
get test content by reference name
        @params:
            ref_call: e.g. api_v1_Account_Login_POST($UserName, $Password)
            ref_type: "api" or "suite"