Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write is_leap(year: int) -> bool to return whether year is a leap year in the Gregorian calendar.
from datetime import datetime
def is_leap(year: int) -> bool:
return datetime(year, 2, 29).isocalendar()[1] == 29
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write is_leap(year: int) -> bool to return whether year is a leap year in the Gregorian calendar.
from datetime import datetime
def is_leap(year: int) -> bool:
return datetime(year, 2, 29).isocalendar()[1] % 4 == 0 and (year % 400 == 0 or (year % 100 != 0 and year % 4 == 0))
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write is_leap(year: int) -> bool to return whether year is a leap year in the Gregorian calendar.
from datetime import datetime
def is_leap(year: int) -> bool:
return datetime(year, 2, 29).isocalendar().weekday() == 2
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write rle(s: str) -> str to perform run-length encoding on s. Replace each run of consecutive identical characters with that character followed by the run length. rle("aaabcc") returns "a3b1c2" and rle("") returns "".
def rle(s: str) -> str:
if not s:
return ""
result = []
current_char = s[0]
count = 1
for char in s[1:]:
if char == current_char:
count += 1
else:
result.append(f"{current_char}{count}")
current_char = char
count = 1
result.append(f"{current_char}{count}")
return "".join(result)
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write rle(s: str) -> str to perform run-length encoding on s. Replace each run of consecutive identical characters with that character followed by the run length. rle("aaabcc") returns "a3b1c2" and rle("") returns "".
def rle(s: str) -> str:
if not s:
return ""
result = []
current_char = s[0]
count = 1
for char in s[1:]:
if char == current_char:
count += 1
else:
result.append(f"{current_char}{count}")
current_char = char
count = 1
result.append(f"{current_char}{count}")
return "".join(result)
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write rle(s: str) -> str to perform run-length encoding on s. Replace each run of consecutive identical characters with that character followed by the run length. rle("aaabcc") returns "a3b1c2" and rle("") returns "".
def rle(s: str) -> str:
if not s:
return ""
result = []
current_char = s[0]
count = 1
for char in s[1:]:
if char == current_char:
count += 1
else:
result.append(f"{current_char}{count}")
current_char = char
count = 1
result.append(f"{current_char}{count}")
return "".join(result)
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write chunks(items, n: int) -> list[list]. items is an iterable, which may be a generator. Return consecutive lists of n elements, where the last list may be shorter. Raise ValueError when n is less than 1.
from typing import Iterable, List, TypeVar
T = TypeVar('T')
def chunks(items: Iterable[T], n: int) -> List[List[T]]:
if n < 1:
raise ValueError("n must be at least 1")
return [list(items)[:n] for _ in range((len(items) + n - 1) // n)]
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write chunks(items, n: int) -> list[list]. items is an iterable, which may be a generator. Return consecutive lists of n elements, where the last list may be shorter. Raise ValueError when n is less than 1.
from typing import Iterable, TypeVar, List
T = TypeVar('T')
def chunks(items: Iterable[T], n: int) -> List[List[T]]:
if n < 1:
raise ValueError("n must be at least 1")
return [list(items_n) for items_n in zip(*([iter(items)] * n))]
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write chunks(items, n: int) -> list[list]. items is an iterable, which may be a generator. Return consecutive lists of n elements, where the last list may be shorter. Raise ValueError when n is less than 1.
from typing import Iterable, Iterator, TypeVar, Union
T = TypeVar('T')
def chunks(items: Iterable[T], n: int) -> list[list[T]]:
if n < 1:
raise ValueError("n must be at least 1")
iterator = iter(items)
return [list(take(n, iterator)) for _ in range(len(iterator))]
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write round_half_up(value: str, digits: int) -> str. The string value represents a decimal number. Round it to digits decimal places, rounding exact ties away from zero based on the exact value written in value. Return a string with exactly digits decimal places, and omit the decimal point when digits is 0. round_half_up("2.675", 2) returns "2.68".
def round_half_up(value: str, digits: int) -> str:
if digits < 0:
raise ValueError("digits must be non-negative")
if digits == 0:
return str(int(float(value)))
decimal_part = value.split('.')
if len(decimal_part) == 1:
decimal_part.append('0') * digits
integer_part = decimal_part[0]
decimal_part = decimal_part[1]
else:
integer_part = decimal_part[0]
decimal_part = decimal_part[1]
if len(decimal_part) < digits:
decimal_part += '0' * (digits - len(decimal_part))
else:
decimal_part = decimal_part[:digits]
scale = 10 ** digits
num = float(integer_part) + float(decimal_part) / scale
if digits > 0:
rounded = round(num, digits)
if rounded == num:
rounded = int(rounded)
formatted = f"{int(rounded):.{digits}f}"
else:
rounded = int(round(num))
formatted = str(rounded)
return formatted
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write round_half_up(value: str, digits: int) -> str. The string value represents a decimal number. Round it to digits decimal places, rounding exact ties away from zero based on the exact value written in value. Return a string with exactly digits decimal places, and omit the decimal point when digits is 0. round_half_up("2.675", 2) returns "2.68".
def round_half_up(value: str, digits: int) -> str:
if digits < 0:
raise ValueError("Digits must be non-negative")
if digits == 0:
return str(int(float(value)))
decimal_part = value.split('.')
if len(decimal_part) == 1:
decimal_part.append('0') * digits
else:
decimal_part = decimal_part[1]
if len(decimal_part) < digits:
decimal_part += '0' * (digits - len(decimal_part))
multiplier = 10 ** digits
rounded = int(float(decimal_part) * multiplier + 0.5) / multiplier
result = f"{decimal_part[:digits]}"
if digits > 0:
return f"{decimal_part[:len(decimal_part) - digits]}{result}"
else:
return str(int(rounded))
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write round_half_up(value: str, digits: int) -> str. The string value represents a decimal number. Round it to digits decimal places, rounding exact ties away from zero based on the exact value written in value. Return a string with exactly digits decimal places, and omit the decimal point when digits is 0. round_half_up("2.675", 2) returns "2.68".
def round_half_up(value: str, digits: int) -> str:
parts = value.split('.')
if len(parts) == 1:
integer_part = parts[0]
fractional_part = ''
else:
integer_part, fractional_part = parts
if digits <= 0:
return integer_part
fractional_part = fractional_part[:digits + 1]
if digits == 0:
return integer_part
if fractional_part:
rounding_digit = fractional_part[-1]
next_digit = fractional_part[-2] if len(fractional_part) > digits else '0'
if rounding_digit == '5' and next_digit in '01234':
carry = 1
elif rounding_digit == '5' and next_digit in '6789':
carry = 1
else:
carry = 0
if carry:
fractional_part = fractional_part[:-1]
if not fractional_part:
integer_part = str(int(integer_part) + 1)
else:
fractional_part = fractional_part[:-1] + '0'
if fractional_part[-1] == '0':
fractional_part = fractional_part[:-1]
if digits == 0:
return integer_part
else:
fractional_part = fractional_part[:digits]
if digits == 0:
return integer_part
else:
return f"{integer_part}.{fractional_part}"
else:
return integer_part
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write parse_kv(line: str) -> dict[str, str]. The string line contains key=value pairs separated by one or more spaces. A value may be enclosed in double quotes; if so, it may contain spaces and =, and the quotes are not included in the parsed value. A value may be empty, as in c=. If a key repeats, use the last value. Return {} for an empty line.
def parse_kv(line: str) -> dict[str, str]:
if not line.strip():
return {}
pairs = []
current_pair = []
in_quotes = False
for char in line:
if char == '"' and (not current_pair or current_pair[-1] != '\\'):
in_quotes = not in_quotes
if char == '=' and not in_quotes:
pairs.append(''.join(current_pair).strip())
current_pair = []
continue
current_pair.append(char)
if current_pair:
pairs.append(''.join(current_pair).strip())
kv_pairs = [pair.split('=', 1) for pair in pairs]
return {k.strip(): v.strip().strip('"') for k, v in kv_pairs if k.strip()}
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write parse_kv(line: str) -> dict[str, str]. The string line contains key=value pairs separated by one or more spaces. A value may be enclosed in double quotes; if so, it may contain spaces and =, and the quotes are not included in the parsed value. A value may be empty, as in c=. If a key repeats, use the last value. Return {} for an empty line.
def parse_kv(line: str) -> dict[str, str]:
if not line.strip():
return {}
pairs = []
current_key = None
current_value = []
in_quotes = False
for char in line:
if char == '"':
in_quotes = not in_quotes
elif char == '=' and not in_quotes:
if current_key is not None:
pairs.append((current_key, ''.join(current_value).strip()))
current_key = None
current_value = []
continue
elif char.isspace() and not in_quotes:
if current_key is not None:
pairs.append((current_key, ''.join(current_value).strip()))
current_key = None
current_value = []
else:
if current_key is None:
current_key = []
current_value.append(char)
if current_key is not None:
pairs.append((current_key, ''.join(current_value).strip()))
return dict(zip(pairs, pairs[1:]) if len(pairs) > 1 else {current_key: ''.join(current_value).strip() if current_key else ''})
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write parse_kv(line: str) -> dict[str, str]. The string line contains key=value pairs separated by one or more spaces. A value may be enclosed in double quotes; if so, it may contain spaces and =, and the quotes are not included in the parsed value. A value may be empty, as in c=. If a key repeats, use the last value. Return {} for an empty line.
def parse_kv(line: str) -> dict[str, str]:
if not line.strip():
return {}
pairs = []
current_key = None
current_value = []
in_quotes = False
for char in line:
if char == '"':
in_quotes = not in_quotes
elif char == '=' and not in_quotes:
if current_key is not None:
pairs.append((''.join(current_key), ''.join(current_value)))
current_key = []
current_value = []
elif char == ' ' and not in_quotes:
if current_key is not None:
pairs.append((''.join(current_key), ''.join(current_value)))
current_key = []
current_value = []
else:
if not current_key:
current_key.append(char)
else:
current_value.append(char)
if current_key is not None:
pairs.append((''.join(current_key), ''.join(current_value)))
return dict(pairs)
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write merge_intervals(intervals: list[tuple[int, int]]) -> list[tuple[int, int]]. The input intervals may be in any order. Merge intervals that overlap or touch, so (1, 2) and (2, 3) become (1, 3). Return the merged intervals as tuples sorted by start, and leave the input list unchanged.
def merge_intervals(intervals: list[tuple[int, int]]) -> list[tuple[int, int]]:
if not intervals:
return []
sorted_intervals = sorted(intervals, key=lambda x: x[0])
merged = [sorted_intervals[0]]
for current in sorted_intervals[1:]:
last = merged[-1]
if current[0] <= last[1]:
merged[-1] = (last[0], max(last[1], current[1]))
else:
merged.append(current)
return merged
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write merge_intervals(intervals: list[tuple[int, int]]) -> list[tuple[int, int]]. The input intervals may be in any order. Merge intervals that overlap or touch, so (1, 2) and (2, 3) become (1, 3). Return the merged intervals as tuples sorted by start, and leave the input list unchanged.
def merge_intervals(intervals: list[tuple[int, int]]) -> list[tuple[int, int]]:
if not intervals:
return []
sorted_intervals = sorted(intervals, key=lambda x: x[0])
merged = [sorted_intervals[0]]
for current in sorted_intervals[1:]:
last = merged[-1]
if current[0] <= last[1]:
merged[-1] = (last[0], max(last[1], current[1]))
else:
merged.append(current)
return merged
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write merge_intervals(intervals: list[tuple[int, int]]) -> list[tuple[int, int]]. The input intervals may be in any order. Merge intervals that overlap or touch, so (1, 2) and (2, 3) become (1, 3). Return the merged intervals as tuples sorted by start, and leave the input list unchanged.
def merge_intervals(intervals: list[tuple[int, int]]) -> list[tuple[int, int]]:
if not intervals:
return []
sorted_intervals = sorted(intervals, key=lambda x: x[0])
merged = [sorted_intervals[0]]
for current in sorted_intervals[1:]:
last = merged[-1]
if current[0] <= last[1]:
merged[-1] = (last[0], max(last[1], current[1]))
else:
merged.append(current)
return merged
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write add_months(d: datetime.date, months: int) -> datetime.date to add months calendar months to d. months may be negative. If the day does not exist in the target month, use the last day of that month.
from datetime import date, timedelta
def add_months(d: date, months: int) -> date:
year, month = d.year + months, d.month
if month > 12:
year += month // 12
month %= 12
elif month < 1:
year += (month - 1) // 12
month += 12
last_day = date(year, month + 1, 1) - timedelta(days=1)
return date(year, month, min(d.day, last_day.day))
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write add_months(d: datetime.date, months: int) -> datetime.date to add months calendar months to d. months may be negative. If the day does not exist in the target month, use the last day of that month.
from datetime import date, timedelta
def add_months(d: date, months: int) -> date:
year, month = d.year + months, d.month
while True:
try:
return date(year, month, d.day)
except ValueError:
month += 1
if month > 12:
year += 1
month -= 12
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write add_months(d: datetime.date, months: int) -> datetime.date to add months calendar months to d. months may be negative. If the day does not exist in the target month, use the last day of that month.
from datetime import date, timedelta
def add_months(d: date, months: int) -> date:
year, month = d.year, d.month
new_year = year + months // 12
new_month = month + months % 12
if new_month > 12:
new_month -= 12
new_year += 1
elif new_month < 1:
new_month += 12
new_year -= 1
last_day = d.replace(year=new_year, month=new_month).replace(day=1) - timedelta(days=1)
return d.replace(year=new_year, month=new_month, day=min(d.day, last_day.day))
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write top_k_words(text: str, k: int) -> list[tuple[str, int]]. A word is a maximal sequence of ASCII letters and apostrophes. Words compare case-insensitively and are returned in lowercase. Return the k most frequent words as (word, count) tuples, sorted by highest count first, breaking ties alphabetically by word.
import re
from collections import defaultdict
def top_k_words(text: str, k: int) -> list[tuple[str, int]]:
words = re.findall(r"[a-zA-Z']+", text)
word_counts = defaultdict(int)
for word in words:
lower_word = word.lower()
word_counts[lower_word] += 1
sorted_words = sorted(
word_counts.items(),
key=lambda item: (-item[1], item[0])
)
return sorted_words[:k]
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write top_k_words(text: str, k: int) -> list[tuple[str, int]]. A word is a maximal sequence of ASCII letters and apostrophes. Words compare case-insensitively and are returned in lowercase. Return the k most frequent words as (word, count) tuples, sorted by highest count first, breaking ties alphabetically by word.
from collections import defaultdict
def top_k_words(text: str, k: int) -> list[tuple[str, int]]:
word_counts = defaultdict(int)
words = re.findall(r"[a-zA-Z']+", text)
for word in words:
lower_word = word.lower()
if "'" in lower_word:
lower_word = lower_word.replace("'", "")
word_counts[lower_word] += 1
sorted_words = sorted(
word_counts.items(),
key=lambda item: (-item[1], item[0])
)
return sorted_words[:k]
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write top_k_words(text: str, k: int) -> list[tuple[str, int]]. A word is a maximal sequence of ASCII letters and apostrophes. Words compare case-insensitively and are returned in lowercase. Return the k most frequent words as (word, count) tuples, sorted by highest count first, breaking ties alphabetically by word.
import re
from collections import defaultdict
def top_k_words(text: str, k: int) -> list[tuple[str, int]]:
words = re.findall(r"[a-zA-Z']+", text)
word_counts = defaultdict(int)
for word in words:
lower_word = word.lower()
word_counts[lower_word] += 1
sorted_words = sorted(word_counts.items(), key=lambda item: (-item[1], item[0]))
return sorted_words[:k]
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write flatten(obj: dict, sep: str = ".") -> dict. Flatten nested dicts and lists into a single level, joining keys with sep and using list indices as keys. Keep an empty dict or empty list as the value at its key. flatten({"a": {"b": 1}, "c": [{"d": 2}, 3], "e": {}}) returns {"a.b": 1, "c.0.d": 2, "c.1": 3, "e": {}}.
from typing import Any, Dict, Union, List, TypeVar
T = TypeVar('T', dict, list)
def flatten(obj: Dict[str, Any], sep: str = ".") -> Dict[str, Any]:
result: Dict[str, Any] = {}
def _flatten(item: Union[Dict[str, Any], List, T], parent_key: str = "") -> None:
if isinstance(item, dict):
for k, v in item.items():
_flatten(v, f"{parent_key}{sep}{k}" if parent_key else k)
elif isinstance(item, list):
for i, v in enumerate(item):
_flatten(v, f"{parent_key}{sep}{i}")
else:
result[parent_key] = item if parent_key else item
_flatten(obj)
return result
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write flatten(obj: dict, sep: str = ".") -> dict. Flatten nested dicts and lists into a single level, joining keys with sep and using list indices as keys. Keep an empty dict or empty list as the value at its key. flatten({"a": {"b": 1}, "c": [{"d": 2}, 3], "e": {}}) returns {"a.b": 1, "c.0.d": 2, "c.1": 3, "e": {}}.
def flatten(obj: dict, sep: str = ".") -> dict:
result = {}
def _flatten(item, parent_key=""):
if isinstance(item, dict):
for k, v in item.items():
new_key = f"{parent_key}{sep}{k}" if parent_key else k
_flatten(v, new_key)
elif isinstance(item, list):
for idx, v in enumerate(item):
new_key = f"{parent_key}{sep}{idx}" if parent_key else str(idx)
_flatten(v, new_key)
else:
result[parent_key] = item if parent_key else item
_flatten(obj)
return result
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write flatten(obj: dict, sep: str = ".") -> dict. Flatten nested dicts and lists into a single level, joining keys with sep and using list indices as keys. Keep an empty dict or empty list as the value at its key. flatten({"a": {"b": 1}, "c": [{"d": 2}, 3], "e": {}}) returns {"a.b": 1, "c.0.d": 2, "c.1": 3, "e": {}}.
from typing import Any, Dict, List, Union
def flatten(obj: Dict[Any, Union[Dict[Any, Any], List[Any], Any]], sep: str = ".") -> Dict[str, Any]:
result: Dict[str, Any] = {}
def _flatten(current: Union[Dict, List, Any], parent_key: str = "") -> None:
if isinstance(current, dict):
for k, v in current.items():
new_key = f"{parent_key}{sep}{k}" if parent_key else k
_flatten(v, new_key)
elif isinstance(current, list):
for i, v in enumerate(current):
new_key = f"{parent_key}{sep}{i}" if parent_key else str(i)
_flatten(v, new_key)
else:
result[parent_key] = current
_flatten(obj)
return result
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write lru(maxsize: int), a decorator factory that caches a function's results by its positional arguments without using functools.lru_cache or functools.cache. It stores at most maxsize results. When the cache is full, evict the least recently used result. A cache hit counts as a use. The decorated function must preserve its original __name__.
from collections import OrderedDict
def lru(maxsize: int):
def decorator(func):
cache = OrderedDict()
def wrapper(*args):
if args in cache:
cache.move_to_end(args)
return cache[args]
result = func(*args)
if len(cache) >= maxsize:
cache.popitem(last=False)
cache[args] = result
return result
wrapper.__name__ = func.__name__
return wrapper
return decorator
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write lru(maxsize: int), a decorator factory that caches a function's results by its positional arguments without using functools.lru_cache or functools.cache. It stores at most maxsize results. When the cache is full, evict the least recently used result. A cache hit counts as a use. The decorated function must preserve its original __name__.
from collections import OrderedDict
def lru(maxsize: int):
def decorator(func):
cache = OrderedDict()
def wrapper(*args):
if args in cache:
cache.move_to_end(args)
return cache[args]
result = func(*args)
if len(cache) >= maxsize:
cache.popitem(last=False)
cache[args] = result
return result
wrapper.__name__ = func.__name__
return wrapper
return decorator
Write Python 3.13 code. Answer with one ```python code block that defines the function described below. Use only the standard library. Do not include explanations, examples, tests, input() calls, or print() calls.
Write lru(maxsize: int), a decorator factory that caches a function's results by its positional arguments without using functools.lru_cache or functools.cache. It stores at most maxsize results. When the cache is full, evict the least recently used result. A cache hit counts as a use. The decorated function must preserve its original __name__.
from collections import OrderedDict
def lru(maxsize: int):
def decorator(func):
cache = OrderedDict()
original_name = func.__name__
def wrapper(*args, **kwargs):
key = args
if key in cache:
cache.move_to_end(key)
return cache[key]
result = func(*args, **kwargs)
if len(cache) >= maxsize:
cache.popitem(last=False)
cache[key] = result
return result
wrapper.__name__ = original_name
return wrapper
return decorator