def METHOD_NAME(name, value, config_type):
    """Get a PassContext configuration value, based on its config data type.
    Parameters
    ----------
    name: str
        config identifier name.
    value: str
        value assigned to the config, provided via command line.
    config_type: str
        data type defined to the config, as string.
    Returns
    -------
    parsed_value: bool, int or str
        a representation of the input value, converted to the type
        specified by config_type.
    """
    parsed_value = None
    if config_type == "IntImm":
        # "Bool" configurations in the PassContext are recognized as
        # IntImm, so deal with this case here
        mapping_values = {
            "false": False,
            "true": True,
        }
        if value.isdigit():
            parsed_value = int(value)
        else:
            # if not an int, accept only values on the mapping table, case insensitive
            parsed_value = mapping_values.get(value.lower(), None)
        if parsed_value is None:
            raise TVMCException(f"Invalid value '{value}' for configuration '{name}'.")
    elif config_type == "runtime.String":
        parsed_value = value
    elif config_type == "Array":
        if name == "tir.add_lower_pass":
            pass_list = value.split(",")
            if len(pass_list) % 2 != 0:
                raise TVMCException(
                    f"The configuration of '{name}' must be of the form "
                    "'tir.add_lower_pass=opt_level1,pass1,opt_evel2,pass2'"
                )
            parsed_value = []
            for i in range(0, len(pass_list), 2):
                level, pass_func = pass_list[i].strip(), pass_list[i + 1].strip()
                try:
                    level = int(level)
                except ValueError:
                    raise TVMCException(f"Only integer is allow for configuration '{name}'.")
                # TODO (@leeexyz) We should parse configurations of each tir Pass.
                #     For now, we only use the defaults. Currently, There are four config nodes:
                #     `tir.transform.LoopPartitionConfig`
                #     `tir.transform.UnrollLoopConfig`
                #     `tir.transform.HoistIfThenElseConfig`
                #     `tir.transform.InjectDoubleBufferConfig`
                # loading pass func and calling it to get the Pass
                pass_func = load_function(pass_func)()
                parsed_value.append((level, pass_func))
        else:
            raise TVMCException(f"Unsupported configuration '{name}' for '{config_type}' type.")
    else:
        # not raise here cause we alreay checked before calling this function
        pass
    return parsed_value