<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_arguments(*args):
 """ Converts a list of arguments from the command line into a list of positional arguments and a dictionary of keyword arguments. Handled formats for keyword arguments are: * --argument=value * --argument value Args: *args (list):
 a list of arguments Returns: ([positional_args], {kwargs}) """

    positional_args = []
    kwargs = {}
    split_key = None

    for arg in args:
        if arg.startswith('--'):
            arg = arg[2:]

            if '=' in arg:
                key, value = arg.split('=', 1)
                kwargs[key.replace('-', '_')] = value
            else:
                split_key = arg.replace('-', '_')
        elif split_key:
            kwargs[split_key] = arg
            split_key = None
        else:
            positional_args.append(arg)

    return positional_args, kwargs