[{'role': 'system', 'content': "You are an expert in machine learning and your task is to classify code snippets into one of the following categories: ['helper_functions', 'load_data', 'data_exploration', 'data_preprocessing', 'evaluation', 'modelling', 'prediction', 'result_visualization', 'save_results', 'comment_only']."}, {'role': 'user', 'content': 'Identify the single most appropriate category to which the provided code belongs. Provide your response as a single category label without any additional information, commentary, or personal opinions.\\nPython Code:def split_data(chars, batch_size, num_steps, split_frac=0.9):\n"""\nSplit character data into training and validation sets, inputs and targets for each set.\nArguments\n---------\nchars: character array\nbatch_size: Size of examples in each of batch\nnum_steps: Number of sequence steps to keep in the input and pass to the network\nsplit_frac: Fraction of batches to keep in the training set\nReturns train_x, train_y, val_x, val_y\n"""\nslice_size = batch_size * num_steps\nn_batches = int(len(chars) / slice_size)\nx = chars[: n_batches*slice_size]\ny = chars[1: n_batches*slice_size + 1]\nx = np.stack(np.split(x, batch_size))\ny = np.stack(np.split(y, batch_size))\nsplit_idx = int(n_batches*split_frac)\ntrain_x, train_y= x[:, :split_idx*num_steps], y[:, :split_idx*num_steps]\nval_x, val_y = x[:, split_idx*num_steps:], y[:, split_idx*num_steps:]\nreturn train_x, train_y, val_x, val_y'}, {'role': 'assistant', 'content': 'data_preprocessing'}]