def METHOD_NAME(valid_from: Optional[str], valid_until: Optional[str]) -> Tuple[Optional[str], Optional[str]]:
    from_date = None
    until_date = None
    if valid_from is not None:
        parsed_from = ""
        try:
            parsed_from = dateutil.parser.parse(valid_from).isoformat()
        except (dateutil.parser.ParserError, OverflowError) as e:
            print(f"Could not parse valid_from {valid_from} date:\n{e}")
        finally:
            from_date = parsed_from
    if valid_until is not None:
        parsed_until = ""
        try:
            parsed_until = dateutil.parser.parse(valid_until).isoformat()
        except (dateutil.parser.ParserError, OverflowError) as e:
            print(f"Could not parse valid_until {valid_until} date:\n{e}")
        finally:
            until_date = parsed_until
    return from_date, until_date