from typing import Union


def milimeter_mercury_to_bars(mm_hg: float, unit: str) -> Union[float, str]:
    """
    This function converts mmHg to bar
    Wikipedia reference: https://en.wikipedia.org/wiki/Bar_(unit)
    Wikipedia reference: https://en.wikipedia.org/wiki/Millimetre_of_mercury

    >>> milimeter_mercury_to_bars(4970.5, "mmHg")
    6.626803189078208
    >>> milimeter_mercury_to_bars("378", "mmHg")
    0.503959683225342
    >>> milimeter_mercury_to_bars(0, "mmHg")
    0.0
    >>> milimeter_mercury_to_bars(3, "bar")
    'Invalid unit'
    >>> milimeter_mercury_to_bars("brs", "mmHg")
    Traceback (most recent call last):
    ...
    ValueError: could not convert string to float: 'brs'
    """
    if unit == "mmHg":
        bar = float(mm_hg) / round(760 / 1.01325, 2)
        return bar
    else:
        return "Invalid unit"