code: def callback_box_select(attr, old, new):
      '''Update TextInput start/end entries from BoxSelectTool selection'''
  
      # Get indices of selection
      ind = sorted(new['1d']['indices'])
  
      if new is None:
          start_input.value = '0'
          end_input.value = '0'
      else:
          start_input.value = str(source.data['ind'][ind[0]])
          end_input.value = str(source.data['ind'][ind[-1]])
          msg = '''
                New start and end index values set.
                '''
          output_window.text = output_template.format(msg)
  
      return Nonf callback_box_select(attr, old, new):
      '''Update TextInput start/end entries from BoxSelectTool selection'''
  
      # Get indices of selection
      ind = sorted(new['1d']['indices'])
  
      if new is None:
          start_input.value = '0'
          end_input.value = '0'
      else:
          start_input.value = str(source.data['ind'][ind[0]])
          end_input.value = str(source.data['ind'][ind[-1]])
          msg = '''
                New start and end index values set.
                '''
          output_window.text = output_template.format(msg)
  
      return None
docs: Update TextInput start/end entries from BoxSelectTool selection