import sqlite3


def returnRowDB(db_path, table, criteria_column=None, criteria=None):
    """
    Return a (specific) row of a database table.
    Input:
    `db_path`(str): Full path to database.
    `table`(str): Name of table to retrieve from.
    Optional, select specific row:
    `criteria_column`(str): Name of column to select row by. Example: 'ID'
    `cirteria`: criteria value in the specified criteria_column. Example: '2' (where ID=2)
    Returns:
    Tuple of the retrieved row form selected table and selected row.
    
    """
    conn = sqlite3.connect(db_path)
    with conn:
        cursor = conn.cursor()

        if criteria_column is not None:
            cursor.execute("SELECT * FROM {} WHERE {}='{}'".format(table,
                                                                   criteria_column,
                                                                   criteria))
        else:
            cursor.execute("SELECT * FROM {}".format(table))
        row = cursor.fetchone()
        return row