"""Utility functions for working with HTML.""" def wrap_tag(tag: str, string: str) -> str: """Wrap a string in an HTML tag. Args: tag: The tag to wrap the string in. string: The string to wrap. Returns: The string wrapped in the tag. Example: >>> wrap_tag("b", "Hello, world!") "Hello, world!" """ tag_lower = tag.lower() return f"<{tag_lower}>{string}" def bold(string: str) -> str: """Wrap a string in a bold tag. Args: string: The string to wrap in bold. Returns: The string wrapped in a bold tag. Example: >>> bold("Hello, world!") "Hello, world!" """ return wrap_tag("b", string)