code: def bundlestate_to_str(state):
          
          states = {
              pelix.Bundle.INSTALLED: "INSTALLED",
              pelix.Bundle.ACTIVE: "ACTIVE",
              pelix.Bundle.RESOLVED: "RESOLVED",
              pelix.Bundle.STARTING: "STARTING",
              pelix.Bundle.STOPPING: "STOPPING",
              pelix.Bundle.UNINSTALLED: "UNINSTALLED",
          }
  
          return states.get(state, "Unknown state ({0})".format(state))
docs: Converts a bundle state integer to a string