human
Give me a Python function to match a series of datetimes.
assistant
Here is a Python function to match a series of datetimes

import datetime

def match_datetime(datetimes: list) -> list:
    """
    Returns a list of datetimes that match the given datetimes.

    :param datetimes:
    :return:
    """
    return [dt for dt in datetimes if dt.date() == datetimes[0].date()]

# Enter the list
datetimes = [datetime.datetime(2018, 1, 1), datetime.datetime(2018, 1, 2), datetime.datetime(2018, 1, 3)]

# Calling the function
print((match_datetime(datetimes)))

#Example Output
# [datetime.datetime(2018, 1, 1, 0, 0)]

#Remember to inspect code for bugs.