<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Python Libraries For Better Code Insights
Snoop - Never Use print Again
Step1:  Snooping on execution
Step2:  Snooping on referenced functions
Step3:  pp - pretty print
Step4:  Shortcut
Step5:  How to use in Jupyter
Load extension with %load_ext snoop in a notebook cell, then use the cell magic %%snoop at the top of a notebook cell to trace that cell
<ASSISTANT_TASK:>
Python Code:
ROMAN = [
    (1000, "M"),
    ( 900, "CM"),
    ( 500, "D"),
    ( 400, "CD"),
    ( 100, "C"),
    (  90, "XC"),
    (  50, "L"),
    (  40, "XL"),
    (  10, "X"),
    (   9, "IX"),
    (   5, "V"),
    (   4, "IV"),
    (   1, "I"),
]
def to_roman(number: int):
    result = ""
    for (arabic, roman) in ROMAN:
        (factor, number) = divmod(number, arabic)
        result += roman * factor
    return result
print(to_roman(2021))
print(to_roman(8))
Explanation: Python Libraries For Better Code Insights
Snoop - Never Use print Again
End of explanation
import snoop
@snoop
def to_roman2(number: int):
    result = ""
    for (arabic, roman) in ROMAN:
        (factor, number) = divmod(number, arabic)
        result += roman * factor
    return result
print(to_roman2(2021))
from statistics import stdev
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
print(f"numbers={numbers}: stdev={stdev(numbers)}")
Explanation: Snooping on execution
End of explanation
def mystddev(max: int) -> float:
    my_numbers = list(range(max))
    with snoop(depth=2):
        return stdev(my_numbers)
print(mystddev(5))
from statistics import median
print(median(numbers) + 2 * stdev(numbers))
Explanation: Snooping on referenced functions
End of explanation
from snoop import pp
pp(pp(median(numbers)) + pp(2 * pp(stdev(numbers))))
Explanation: pp - pretty print
End of explanation
# print(median(numbers) + 2 * stdev(numbers))
pp.deep(lambda: median(numbers) + 2 * stdev(numbers))
Explanation: Shortcut: pp.deep + parameters-less lambda
End of explanation
users = { 
    'user1': { 'is_admin': True, 'email': 'one@exmple.com'},
    'user2': { 'is_admin': True, 'phone': '281-555-5555' },
    'user3': { 'is_admin': False, 'email': 'three@example.com' },
}
def email_user(*user_names) -> None:
    global users
    for user in user_names:
        print("Emailing %s at %s", (user, users[user]['email']))
email_user('user1', 'user2')
Explanation: How to use in Jupyter
Load extension with %load_ext snoop in a notebook cell, then use the cell magic %%snoop at the top of a notebook cell to trace that cell:
better-exceptions - Better and Prettier Stack Traces
End of explanation
<END_TASK>