def get_trans_id_time(trans_id):
    """
    Returns the time.time() embedded in the trans_id or None if no
    time information is embedded.

    Copied from the Swift codebase.
    Copyright (c) 2010-2012 OpenStack Foundation
    """
    if len(trans_id) >= 34 and trans_id[:2] == 'tx' and trans_id[23] == '-':
        try:
            return int(trans_id[24:34], 16)
        except __HOLE__:
            pass
    return None
dataset/ETHPy150Open gholt/swiftly/swiftly/client/utils.py/get_trans_id_time