<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _serve_environment(self, request):
 """Serve a JSON object containing some base properties used by the frontend. * data_location is either a path to a directory or an address to a database (depending on which mode TensorBoard is running in). * window_title is the title of the TensorBoard web page. """

    return http_util.Respond(
        request,
        {
            'data_location': self._logdir or self._db_uri,
            'mode': 'db' if self._db_uri else 'logdir',
            'window_title': self._window_title,
        },
        'application/json')