code: def get_remaining_ports(
      ports: List[int], last_used_port: int
  ) -> List[int]:
      """Get a new list with the remaining ports after cutting out all ports until and incl. the last used port.
  
      Args:
          ports (List[int]): The port list to be updated.
          last_used_port (int): The last port that was actually used. All ports up this one and including this one will
                                be removed.
  
      Returns:
          List with remaining ports
      """
      skip = True
      final_port_list = []
      for port in ports:
          if skip:
              if port == last_used_port:
                  skip = False
              continue
          final_port_list.append(port)
      return final_port_list
  
imports: import os
  import platform
  import socket
  import subprocess
  import sys
  from typing import Dict, List, Union
  import lazycluster.settings
  from .utils import Environment
label_desc: Use image node_id 1 for calling a global function with example usage: get_remaining_ports(ports, last_used_port) and returns: final_port_list