<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run(self, realm, users):
 		""" 		Requests a TGT in the name of the users specified in users. 		Returns a list of usernames that are in the domain. 		realm: kerberos realm (domain name of the corp) 		users: list : list of usernames to test 		"""

		existing_users = []
		for user in users:
			logging.debug('Probing user %s' % user)
			req = KerberosUserEnum.construct_tgt_req(realm, user)
			rep = self.ksoc.sendrecv(req.dump(), throw = False)
			
			if rep.name != 'KRB_ERROR':	
				# user doesnt need preauth, but it exists
				existing_users.append(user)
			
			elif rep.native['error-code'] != KerberosErrorCode.KDC_ERR_PREAUTH_REQUIRED.value:
				# any other error means user doesnt exist
				continue
			
			else:
				# preauth needed, only if user exists
				existing_users.append(user)

		return existing_users