def str_to_time(time_str: str, period: int) -> int:
    """ This function converts a period and time to seconds remaining
    in the quarter


	@param time_str (str): Game time in MM:SS format
	@param period (int): Game quarter (5 is OT1, 6 is OT2, etc.)

	Returns

		- seconds_left_period (int): Seconds left in the given period
    """

    split_time = time_str.split(':')
    seconds_left_period = int(split_time[0]) * 60 + int(split_time[1])

    return seconds_left_period