def time_snowflake(dt: datetime.datetime, high: bool=False) -> int:
    'Returns a numeric snowflake pretending to be created at the given date.\n\n    When using as the lower end of a range, use ``time_snowflake(high=False) - 1``\n    to be inclusive, ``high=True`` to be exclusive.\n\n    When using as the higher end of a range, use ``time_snowflake(high=True) + 1``\n    to be inclusive, ``high=False`` to be exclusive\n\n    Parameters\n    -----------\n    dt: :class:`datetime.datetime`\n        A datetime object to convert to a snowflake.\n        If naive, the timezone is assumed to be local time.\n    high: :class:`bool`\n        Whether or not to set the lower 22 bit to high or low.\n\n    Returns\n    --------\n    :class:`int`\n        The snowflake representing the time given.\n    '
    discord_millis = int(((dt.timestamp() * 1000) - DISCORD_EPOCH))
    return ((discord_millis << 22) + (((2 ** 22) - 1) if high else 0))
Returns a numeric snowflake pretending to be created at the given date.

When using as the lower end of a range, use ``time_snowflake(high=False) - 1``
to be inclusive, ``high=True`` to be exclusive.

When using as the higher end of a range, use ``time_snowflake(high=True) + 1``
to be inclusive, ``high=False`` to be exclusive

Parameters
-----------
dt: :class:`datetime.datetime`
    A datetime object to convert to a snowflake.
    If naive, the timezone is assumed to be local time.
high: :class:`bool`
    Whether or not to set the lower 22 bit to high or low.

Returns
--------
:class:`int`
    The snowflake representing the time given.
def time_snowflake(dt: datetime.datetime, high: bool=False) -> int:
    'Returns a numeric snowflake pretending to be created at the given date.\n\n    When using as the lower end of a range, use ``time_snowflake(high=False) - 1``\n    to be inclusive, ``high=True`` to be exclusive.\n\n    When using as the higher end of a range, use ``time_snowflake(high=True) + 1``\n    to be inclusive, ``high=False`` to be exclusive\n\n    Parameters\n    -----------\n    dt: :class:`datetime.datetime`\n        A datetime object to convert to a snowflake.\n        If naive, the timezone is assumed to be local time.\n    high: :class:`bool`\n        Whether or not to set the lower 22 bit to high or low.\n\n    Returns\n    --------\n    :class:`int`\n        The snowflake representing the time given.\n    '
    discord_millis = int(((dt.timestamp() * 1000) - DISCORD_EPOCH))
    return ((discord_millis << 22) + (((2 ** 22) - 1) if high else 0))