code: def _componentSortKey(componentAndType):
          
          component, asn1Spec = componentAndType
  
          if asn1Spec is None:
              asn1Spec = component
  
          if asn1Spec.typeId == univ.Choice.typeId and not asn1Spec.tagSet:
              if asn1Spec.tagSet:
                  return asn1Spec.tagSet
              else:
                  return asn1Spec.componentType.minTagSet
          else:
              return asn1Spec.tagSet
docs: Sort SET components by tag
  
          Sort regardless of the Choice value (static sort)