code: def nic_v2(msg, NICa, NICbc):
      
      if typecode(msg) < 5 or typecode(msg) > 22:
          raise RuntimeError(
              "%s: Not a surface position message (5<TC<8), \
              airborne position message (8<TC<19), \
              or airborne position with GNSS height (20<TC<22)" % msg
          )
  
      tc = typecode(msg)
      NIC = uncertainty.TC_NICv2_lookup[tc]
  
      if 20<=tc<=22:
          NICs = 0
      else:
          NICs = NICa*2 + NICbc
  
      try:
          if isinstance(NIC, dict):
              NIC = NIC[NICs]
  
          Rc = uncertainty.NICv2[NIC][NICs]['Rc']
      except KeyError:
          Rc = uncertainty.NA
  
      return Rc
docs: Calculate NIC, navigation integrity category, for ADS-B version 2
  
      Args:
          msg (string): 28 bytes hexadecimal message string
          NICa (int or string): NIC supplement - A
          NICbc (int or srting): NIC supplement - B or C
  
      Returns:
          int or string: Horizontal Radius of Containment