async def check_memory(client, channel: str, memory_warn_fraction=0.8, sleep_time=3600):
    "Quick function for checking current server memory and sending a warning to a desired channel if it's\n    too high."
    global _LAST_MEMORY_FRACTION
    current_usage = current_memory_fraction()
    if (_LAST_MEMORY_FRACTION < memory_warn_fraction):
        if (current_usage > memory_warn_fraction):
            (await _send_message(client, channel, f'WARNING: current memory usage at {current_usage:.2%}!'))
            thread_df = (await _get_resource_usage_dataframe(measurement_time=1.0))
            thread_df = thread_df.sort_values('memory')
            message = ['Users with something currently running:']
            for (i, a_row) in thread_df.iterrows():
                message.append(f"{a_row.name}: {a_row['cpu_percent']:.2f}% CPU -- {a_row['memory']:.2f} GB-- {a_row['threads']} threads")
            message.append(f'''
(no further warnings will be sent for a sleep period of {(sleep_time / (60 ** 2)):.2f} hour(s))''')
            (await _send_message(client, channel, '\n'.join(message)))
            (await asyncio.sleep(sleep_time))
    _LAST_MEMORY_FRACTION = current_usage
Quick function for checking current server memory and sending a warning to a desired channel if it's
too high.
async def check_memory(client, channel: str, memory_warn_fraction=0.8, sleep_time=3600):
    "Quick function for checking current server memory and sending a warning to a desired channel if it's\n    too high."
    global _LAST_MEMORY_FRACTION
    current_usage = current_memory_fraction()
    if (_LAST_MEMORY_FRACTION < memory_warn_fraction):
        if (current_usage > memory_warn_fraction):
            (await _send_message(client, channel, f'WARNING: current memory usage at {current_usage:.2%}!'))
            thread_df = (await _get_resource_usage_dataframe(measurement_time=1.0))
            thread_df = thread_df.sort_values('memory')
            message = ['Users with something currently running:']
            for (i, a_row) in thread_df.iterrows():
                message.append(f"{a_row.name}: {a_row['cpu_percent']:.2f}% CPU -- {a_row['memory']:.2f} GB-- {a_row['threads']} threads")
            message.append(f'
(no further warnings will be sent for a sleep period of {(sleep_time / (60 ** 2)):.2f} hour(s))')
            (await _send_message(client, channel, '\n'.join(message)))
            (await asyncio.sleep(sleep_time))
    _LAST_MEMORY_FRACTION = current_usage