def METHOD_NAME(cls, s):
    if len(s) != cls.HASH256_HEX_NUM_NYBBLES:
        raise PDQHashFormatException("Incorrect length", s)
    rv = Hash256()
    i = cls.HASH256_NUM_SLOTS
    for x in range(0, len(s), 4):
        try:
            i -= 1
            rv.w[i] = int(s[x : x + 4], 16)
        except ValueError:
            raise PDQHashFormatException("Incorrect format", s)
    return rv