code: def authenticationAndCipheringRequest(
                                        AuthenticationParameterRAND_presence=0,
                                        CiphKeySeqNr_presence=0):
      
      a = TpPd(pd=0x3)
      b = MessageType(mesType=0x12)  # 00010010
      d = CipheringAlgorithmAndImeisvRequest()
      e = ForceToStandbyAndAcReferenceNumber()
      packet = a / b / d / e
      if AuthenticationParameterRAND_presence is 1:
          g = AuthenticationParameterRAND(ieiAPR=0x21)
          packet = packet / g
      if CiphKeySeqNr_presence is 1:
          h = CiphKeySeqNrHdr(ieiCKSN=0x08, eightBitCKSN=0x0)
          packet = packet / h
      return packet
docs: AUTHENTICATION AND CIPHERING REQUEST Section 9.4.9