docs: def _argumentForLoader(loaderClass):
      """
      Create an AMP argument for (de-)serializing instances of C{loaderClass}.
  
      @param loaderClass: A type object with a L{load} class method that takes
          some bytes and returns an instance of itself, and a L{dump} instance
          method that returns some bytes.
  
      @return: a class decorator which decorates an AMP argument class by
          replacing it with the one defined for loading and saving C{loaderClass}
          instances.
      """
      def decorator(argClass):
          class LoadableArgument(String):
              def toString(self, arg):
                  assert isinstance(arg, loaderClass), \
                      ("%r not %r" % (arg, loaderClass))
                  return String.toString(self, arg.dump())
  
              def fromString(self, arg):
                  return loaderClass.load(String.fromString(self, arg))
  
          LoadableArgument.__name__ = argClass.__name__
          return LoadableArgument
      return decorator