docs: def m2i(self, pkt, s):
          """
          First we have to retrieve the appropriate choice.
          Then we extract the field/packet, according to this choice.
          """
          if len(s) == 0:
              raise ASN1_Error("ASN1F_CHOICE: got empty string")
          _, s = BER_tagging_dec(s, hidden_tag=self.ASN1_tag,
                                 explicit_tag=self.explicit_tag)
          tag, _ = BER_id_dec(s)
          if tag not in self.choices:
              if self.flexible_tag:
                  choice = ASN1F_field
              else:
                  raise ASN1_Error("ASN1F_CHOICE: unexpected field")
          else:
              choice = self.choices[tag]
          if hasattr(choice, "ASN1_root"):
              # we don't want to import ASN1_Packet in this module...
              return self.extract_packet(choice, s)
          elif isinstance(choice, type):
              # XXX find a way not to instantiate the ASN1F_field
              return choice(self.name, b"").m2i(pkt, s)
          else:
              # XXX check properly if this is an ASN1F_PACKET
              return choice.m2i(pkt, s)