<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_numbers(number, prefix=""):
 """Formats number in the scientific notation for LaTeX. :param number: the number to format. :param prefix: a prefix to add before the number (e.g. "p < "). :type number: str :type prefix: str :returns: a string containing the scientific notation of the number. :rtype: str """

    # Matching
    r = re.match(r"^([-+]?\d*\.\d+|\d+)e([-+]?\d+)$", number)

    # Nothing matched
    if not r:
        if prefix != "":
            return "$" + prefix + number + "$"
        else:
            return number

    # Getting the coefficient and the exponent
    coefficient = r.group(1)
    exponent = int(r.group(2))

    return "$" + prefix + coefficient + r"\times 10^{" + str(exponent) + "}$"