import re


def trim_year(year):
    """Used to trim roman numerals from year values.

    IMDb differentiates movies of the same title and the same year with
    the format: `YYYY/<Roman numeral>`. This function removes the roman numerals
    and returns just the year value.

    Args:
        year (:obj:`str`): The year and roman numeral combination.

    Returns:
        :obj:`str`: The year with roman numerals removed, or `None` if year was `None`.
    """

    return re.sub(r'/\w*', '', year) if year is not None else None