Провести рефакторинг кода.
def factorial(x): import re import urllib import time time.sleep(2) class```