code: def log(self, message, level=LOG_INFO):
          
          assert level in [
              self.LOG_ERROR,
              self.LOG_INFO,
              self.LOG_WARNING,
          ], "level must be LOG_ERROR, LOG_INFO or LOG_WARNING"
  
          # nicely format logs if we can using pretty print
          if isinstance(message, (dict, list, set, tuple)):
              message = pformat(message)
          # start on new line if multi-line output
          try:
              if "\n" in message:
                  message = "\n" + message
          except:  # noqa e722
              pass
          message = "Module `{}`: {}".format(self._module.module_full_name, message)
          self._py3_wrapper.log(message, level)
docs: Log the message.
          The level must be one of LOG_ERROR, LOG_INFO or LOG_WARNING