def METHOD_NAME(scenario):
    """
    Obtain a list of block names and a list of their arguments from the command line arguments list.
    :return: A tuple block names, block arguments.
    :rtype: tuple
    """
    block_names = []
    block_args = []
    number_of_blocks = 0
    for token in scenario:
        logging.debug("Token %s", token)
        # If there is no '=' character in the token, consider is as a block name.
        # Initialize the block arguments to an empty dict.
        if '=' not in token:
            logging.debug("- block name")
            block_names.append(token)
            block_args.append({})
            number_of_blocks += 1
            continue
        # Otherwise consider the token to be a block argument in the form
        # key=value.
        logging.debug("- argument")
        # The first '=' in the token separates name from value.
        # The value may contain other '=' characters (e.g. in util.Eval node='node.form = "_"').
        attribute_name, attribute_value = token.split('=', 1)
        if number_of_blocks == 0:
            raise RuntimeError(
                'Block attribute pair %r without a prior block name', token)
        # Put it as a new argument for the previous block
        if attribute_value.isdigit():
            attribute_value = int(attribute_value)
        block_args[-1][attribute_name] = attribute_value
    return block_names, block_args