import re


def get_class(file):
    """From a file return a dict or input and output readers.

    Parameters
    ----------
    file : str
        Plugin file to parse.

    Returns
    -------
    (list, list)
        List of input reader and list of output reader.

    """
    all_reader_input = []
    all_reader_output = []
    with open(file, "r") as f:
        contents = f.read()
    match = re.findall("class (\w+)\(AbstractNetworkReader\)", contents, re.MULTILINE)
    if match is not None:
        for reader in match:
            all_reader_input.append(reader)

    match = re.findall(
        "class (\w+)\(AbstractTrafficDataReader\)", contents, re.MULTILINE
    )
    if match is not None:
        for reader in match:
            all_reader_output.append(reader)

    return all_reader_input, all_reader_output