def make_port_dict(port_id, port_state, net_id, attachment):
 res = {const.PORT_ID: port_id, const.PORT_STATE: port_state}
 res[const.NET_ID] = net_id
 res[const.ATTACHMENT] = attachment
 return res

def make_port_dict ( port_id , port_state , net_id , attachment ) : res = { const . PORT_ID : port_id , const . PORT_STATE : port_state } res [ const . NET_ID ] = net_id res [ const . ATTACHMENT ] = attachment return res
helper funciton .