import re
from datetime import datetime


def _get_iso_date(date_string: str) -> str:
    """ convert date from the form 1/22/2021 13:28:27 to iso format """
    regex = r'\d{1,2}/\d{1,2}/\d{4} \d{1,2}:\d{1,2}:\d{1,2}'
    found_list = re.findall(regex, date_string)
    if found_list:
        date_value = datetime.strptime(date_string, '%m/%d/%Y %H:%M:%S')
        return date_value.isoformat()
    return date_string