original_docstring: Get ports with speed from TG instances.
  
          Returns:
              tuple(list[tuple], list[tuple, int]):  Tuple with list of ports used in real config and list of port/speed values
  
          
docstring: Get ports with speed from TG instances.
docstring_tokens: Get ports with speed from TG instances .
code: def _get_speed_ports(self):
          """Get ports with speed from TG instances.
  
          Returns:
              tuple(list[tuple], list[tuple, int]):  Tuple with list of ports used in real config and list of port/speed values
  
          """
  
          ports = []
          ports_list = []
          if any(x.port_list for x in self.tgs.values()):
              for tg in self.tgs.values():
                  if tg.port_list:
                      ports_list.extend([[Port(tg.id, _port[0]), _port[1]] for _port in tg.port_list])
                  else:
                      ports_list.extend([[Port(tg.id, _port), DEFAULT_SPEED] for _port in tg.ports])
              ports = [_port[0] for _port in ports_list]
          else:
              ports = [Port(x.id, port) for x in self.tgs.values() for port in x.ports]
  
          return ports, ports_list
code_tokens: def _get_speed_ports ( self ) : ports = [ ] ports_list = [ ] if any ( x . port_list for x in self . tgs . values ( ) ) : for tg in self . tgs . values ( ) : if tg . port_list : ports_list . extend ( [ [ Port ( tg . id , _port [ 0 ] ) , _port [ 1 ] ] for _port in tg . port_list ] ) else : ports_list . extend ( [ [ Port ( tg . id , _port ) , DEFAULT_SPEED ] for _port in tg . ports ] ) ports = [ _port [ 0 ] for _port in ports_list ] else : ports = [ Port ( x . id , port ) for x in self . tgs . values ( ) for port in x . ports ] return ports , ports_list
short_docstring: Get ports with speed from TG instances.
short_docstring_tokens: Get ports with speed from TG instances .
comment: """Get ports with speed from TG instances.
  
          Returns:
              tuple(list[tuple], list[tuple, int]):  Tuple with list of ports used in real config and list of port/speed values
  
          """