<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_tgt(ksoc, tgt, key):
 		""" 		Sets up the kerberos object from tgt and the session key. 		Use this function when pulling the TGT from ccache file. 		"""

		kc = KerbrosComm(None, ksoc)
		kc.kerberos_TGT = tgt
		
		kc.kerberos_cipher_type = key['keytype']
		kc.kerberos_session_key = Key(kc.kerberos_cipher_type, key['keyvalue']) 
		kc.kerberos_cipher = _enctype_table[kc.kerberos_cipher_type]
		return kc