code: def install_app(cls, id, raw, api=None, raw_format=None):
          
          api = api if api else cls._API
          raw_format = raw_format.lower() if raw_format else AppRawFormat.JSON
          extra = {
              'resource': cls.__name__,
              'query': {
                  'id': id,
                  'data': raw
              }
          }
          logger.info('Installing app', extra=extra)
  
          # Set content type for raw app data
          if raw_format not in cls._CONTENT_TYPE.keys():
              raise SbgError(
                  'Unsupported raw data format: "{}".'
                  .format(raw_format))
          headers = {'Content-Type': cls._CONTENT_TYPE[raw_format]}
  
          app = api.post(
              url=cls._URL['raw'].format(id=id),
              data=raw,
              headers=headers,
          ).json()
          app_wrapper = api.get(
              url=cls._URL['get'].format(id=app['sbg:id'])).json()
          return App(api=api, **app_wrapper)
docs: Installs and app.
          :param id:  App identifier.
          :param raw: Raw cwl data.
          :param api: Api instance.
          :param raw_format: Format of raw app data being sent, json by default
          :return: App object.