<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _registerNode(self, nodeAddress, agentId, nodePort=5051):
 """ Called when we get communication from an agent. Remembers the information about the agent by address, and the agent address by agent ID. """

        executor = self.executors.get(nodeAddress)
        if executor is None or executor.agentId != agentId:
            executor = self.ExecutorInfo(nodeAddress=nodeAddress,
                                         agentId=agentId,
                                         nodeInfo=None,
                                         lastSeen=time.time())
            self.executors[nodeAddress] = executor
        else:
            executor.lastSeen = time.time()
            
        # Record the IP under the agent id
        self.agentsByID[agentId] = nodeAddress
            
        return executor