code: def set_kg(self, kg):
          
          try:
              self.kg = kg.encode('utf-8')
          except AttributeError:
              self.kg = kg
docs: Sets the Kg for the BMC to use
  
          In RAKP, Kg is a BMC-specific integrity key that can be set.  If not
          set, Kuid is used for the integrity key