code: def embed_hex(runtime_hex, python_hex=None):
      
      if not runtime_hex:
          raise ValueError('MicroPython runtime hex required.')
      if not python_hex:
          return runtime_hex
      py_list = python_hex.split()
      runtime_list = runtime_hex.split()
      embedded_list = []
      # The embedded list should be the original runtime with the Python based
      # hex embedded two lines from the end.
      embedded_list.extend(runtime_list[:-5])
      embedded_list.extend(py_list)
      embedded_list.extend(runtime_list[-5:])
      return '\n'.join(embedded_list) + '\n'
docs: Given a string representing the MicroPython runtime hex, will embed a
      string representing a hex encoded Python script into it.
  
      Returns a string representation of the resulting combination.
  
      Will raise a ValueError if the runtime_hex is missing.
  
      If the python_hex is missing, it will return the unmodified runtime_hex.