code: def testServeSourceFileWithOutOfBoundIndexErrors(self):
      _generate_tfdbg_v2_data(self.logdir)
      run = self._getExactlyOneRun()
      # First, access the source file list, so we can get hold of the index
      # for this file. The index is required for the request to the
      # "/source_files/file" route below.
      response = self.server.get(
          _ROUTE_PREFIX + "/source_files/list?run=%s" % run
      )
      source_file_list = json.loads(response.get_data())
      self.assertTrue(source_file_list)
  
      # Use an out-of-bound index.
      invalid_index = len(source_file_list)
      response = self.server.get(
          _ROUTE_PREFIX
          + "/source_files/file?run=%s&index=%d" % (run, invalid_index)
      )
      self.assertEqual(400, response.status_code)
      self.assertEqual(
          "application/json", response.headers.get("content-type")
      )
      self.assertEqual(
          json.loads(response.get_data()),
          {
              "error": "Not found: There is no source-code file at index %d"
              % invalid_index
          },
      )
  
imports: import collections
  import json
  import os
  import socket
  import threading
  import tensorflow
  from werkzeug import test
  from werkzeug import wrappers
  from tensorboard.backend import application
  from tensorboard.plugins import base_plugin
  from tensorboard.plugins.debugger_v2 import debug_data_multiplexer
  from tensorboard.plugins.debugger_v2 import debugger_v2_plugin
label_desc: Use image node_id 45 for calling the DebuggerV2PluginTest obj's underlying member method code with example usage: obj.testServeSourceFileWithOutOfBoundIndexErrors() without return types