def convert_table(table):
    """
    Prepare table for str.translate method.

    Borrowed from https://github.com/dchaplinsky/translit-ua project
    >>> print(1072 in convert_table({"а": "a"}))
    True
    >>> print(1073 in convert_table({"а": "a"}))
    False
    >>> print(convert_table({"а": "a"})[1072] == "a")
    True
    >>> print(len(convert_table({"а": "a"}).keys()) == 1)
    True
    """
    return dict((ord(k), v) for k, v in table.items())