<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sendPkt(self, pkt, retry=5, sleep_time=0.01):
 		""" 		Sends a packet and waits for a return. If no return is given, then it 		resends the packet. If an error occurs, it also resends the packet. 		in: 			pkt - command packet to send to servo 			cnt - how many retries should this do? default = 5 		out: 			array of packets 		"""

		for cnt in range(retry):
			self.serial.flushInput()
			self.write(pkt)  # send packet to servo
			ans = self.read()  # get return status packet

			if ans:
				# check for error and resend
				return ans

			else:
				# print('>> retry {} <<'.format(cnt))
				time.sleep(sleep_time)

		return None