def attachRequest(PTmsiSignature_presence=0, GprsTimer_presence=0, TmsiStatus_presence=0):
 a = TpPd(pd=3)
 b = MessageType(mesType=1)
 c = MsNetworkCapability()
 d = AttachTypeAndCiphKeySeqNr()
 f = DrxParameter()
 g = MobileId()
 h = RoutingAreaIdentification()
 i = MsRadioAccessCapability()
 packet = (((((((a / b) / c) / d) / f) / g) / h) / i)
 if (PTmsiSignature_presence is 1):
  j = PTmsiSignature(ieiPTS=25)
  packet = (packet / j)
 if (GprsTimer_presence is 1):
  k = GprsTimer(ieiGT=23)
  packet = (packet / k)
 if (TmsiStatus_presence is 1):
  l = TmsiStatus(ieiTS=9)
  packet = (packet / l)
 return packet

def attachRequest ( PTmsiSignature_presence = 0 , GprsTimer_presence = 0 , TmsiStatus_presence = 0 ) : a = TpPd ( pd = 3 ) b = MessageType ( mesType = 1 ) c = MsNetworkCapability ( ) d = AttachTypeAndCiphKeySeqNr ( ) f = DrxParameter ( ) g = MobileId ( ) h = RoutingAreaIdentification ( ) i = MsRadioAccessCapability ( ) packet = ( ( ( ( ( ( ( a / b ) / c ) / d ) / f ) / g ) / h ) / i ) if ( PTmsiSignature_presence is 1 ) : j = PTmsiSignature ( ieiPTS = 25 ) packet = ( packet / j ) if ( GprsTimer_presence is 1 ) : k = GprsTimer ( ieiGT = 23 ) packet = ( packet / k ) if ( TmsiStatus_presence is 1 ) : l = TmsiStatus ( ieiTS = 9 ) packet = ( packet / l ) return packet
attach request section 9 .