def parse_simpleflake(flake):
    timestamp = SIMPLEFLAKE_EPOCH\
        + extract_bits(flake,
                       SIMPLEFLAKE_TIMESTAMP_SHIFT,
                       SIMPLEFLAKE_TIMESTAMP_LENGTH) / 1000.0
    random = extract_bits(flake,
                          SIMPLEFLAKE_RANDOM_SHIFT,
                          SIMPLEFLAKE_RANDOM_LENGTH)
    return simpleflake_struct(timestamp, random)
Parses a simpleflake and returns a named tuple with the parts.
dataset/ETHPy150Open SawdustSoftware/simpleflake/simpleflake/simpleflake.py/parse_simpleflake