def METHOD_NAME(run, log_dir):
    """
    Function that collects and logs TensorBoard-compatible events to an Experiment Run.
    This integration logs scalars that have been written as TensorFlow summaries.
    This integration has been verified to work with TensorFlow >=1.14 and 2.X.
    Parameters
    ----------
    run : :class:`~verta.tracking.entities.ExperimentRun`
        Experiment Run.
    log_dir : str
        Directory containing TensorBoard-compatible event files.
    Examples
    --------
    .. code-block:: python
        from verta.integrations.tensorflow import log_tensorboard_log_dir
        run = client.set_experiment_run()
        # log summary event files to `log_dir` during model operations
        # see https://www.tensorflow.org/tensorboard/get_started
        log_tensorboard_events(run, log_dir)
    """
    observations = []
    for events_filepath in _get_events_filepaths(log_dir):
        event_observations = _collect_observations(events_filepath)
        observations.extend(event_observations)
    for subdir in ("train", "validation"):  # TensorFlow 2.X puts events in subdirs
        if subdir in os.listdir(log_dir) and os.path.isdir(
            os.path.join(log_dir, subdir)
        ):
            for events_filepath in _get_events_filepaths(os.path.join(log_dir, subdir)):
                event_observations = _collect_observations(
                    events_filepath, prefix=subdir
                )
                observations.extend(event_observations)
    # TODO: implement `run.log_observations()` instead of this
    _utils.make_request(
        "POST",
        "{}://{}/api/v1/modeldb/experiment-run/logObservations".format(
            run._conn.scheme, run._conn.socket
        ),
        run._conn,
        json={
            "id": run.id,
            "observations": observations,
        },
    )
    run._clear_cache()