code: def _insert_dark_mode_styles(resp):
      text = b"".join(resp)
  
      out = []
      content_len = 0
  
      def add(part):
          nonlocal content_len
          if part:
              out.append(part)
              content_len += len(part)
  
      parts = text.split(b"</head>", 1)
      assert len(parts) == 2, parts
  
      add(parts[0])
      add(
          b"""<style>
  
  html {
    --primary-text-color: #fff !important;
    --primary-background-color: #252526 !important;
    --secondary-text-color: #fff;
    --secondary-background-color: #1e1e1e !important;
    --tb-orange-strong: #1e1e1e !important;
  }
  
  body.dark-mode .mat-toolbar {
    background-color: #1e1e1e !important;
  }
  
  .tab-bar {
    background-color: #1e1e1e !important;
  }
  
  
  app-header-dark-mode-toggle {
    display: none;
  }
  </style>
  """
      )
      add(b"</head>")
  
      parts = parts[1].split(b"<body>", 1)
      assert len(parts) == 2, parts
  
      add(parts[0])
      add(b'<body class="dark-mode">')
      add(parts[1])
  
      return out, content_len
  
imports: import logging
  import os
  import socket
  import time
  import warnings
  from guild import util
label_desc: Use image node_id 28 for calling a global function with example usage: _insert_dark_mode_styles(resp) and returns: out,  content_len