def parse_args(*args: Type[Arguments]) -> tuple[Arguments, ...]:
    """
    Parse arguments from different argument dataclasses

    Example:
        >>> model_args, data_args, train_args = parse_args(ModelArguments, DataArguments, TrainingArguments)
    """
    parser = HfArgumentParser(args)
    if len(sys.argv) == 2:
        if sys.argv[1].endswith(".json"):
            # If we pass only one argument to the script and it's the path to a json file,
            # let's parse it to get our arguments.
            arg_tuple = parser.parse_json_file(json_file=os.path.abspath(sys.argv[1]))
        elif sys.argv[1].endswith(".yaml") or sys.argv[1].endswith(".yml"):
            arg_tuple = parser.parse_yaml_file(yaml_file=os.path.abspath(sys.argv[1]))
        else:
            raise ValueError(
                "Only yaml, yml, and json config files are supported, got"
                f" {sys.argv[1]}"
            )
    else:
        arg_tuple = parser.parse_args_into_dataclasses()

    data_args = None
    training_args = None
    for arg in arg_tuple:
        if isinstance(arg, DataArguments):
            data_args = arg
        elif isinstance(arg, TrainingArguments):
            training_args = arg

    if hasattr(data_args, "block_size"):
        training_args.block_size = data_args.block_size

    return arg_tuple

    Parse arguments from different argument dataclasses

    Example:
        >>> model_args, data_args, train_args = parse_args(ModelArguments, DataArguments, TrainingArguments)
    
smoe/utils/config.py