docs: def is_within_content_length_limit(payload, api_config):
          """
          Check that the message content is within the configured length limit.
          """
          length_limit = api_config.get('content_length_limit')
          if (length_limit is not None) and (payload["content"] is not None):
              content_length = len(payload["content"])
              if content_length > length_limit:
                  return "Payload content too long: %s > %s" % (
                      content_length, length_limit)
          return None