def bigquery_serialize_datetime(py_datetime):
    """
    Convert a python datetime object into a serialized format that Bigquery accepts.
    Accurate to milliseconds.
    Bigguery format: 'YYYY-[M]M-[D]D[( |T)[H]H:[M]M:[S]S[.DDDDDD]]'
    https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#canonical-format_3

    Args:
        py_datetime (datetime.datetime):  The date to convert.
    Returns:
        (str): The Serialized date.
    """
    # deserialize with datetime.strptime(serialized_str + '00', '%Y-%m-%d %H:%M:%S.%f')
    return py_datetime.strftime('%Y-%m-%d %H:%M:%S.%f')