@classmethod<EOL><INDENT>def custom(cls, customgrouper):<DEDENT>
if customgrouper is None:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>if not isinstance(customgrouper, ICustomGrouping) and not isinstance(customgrouper, str):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>serialized = default_serializer.serialize(customgrouper)<EOL>return cls.custom_serialized(serialized, is_java=False)<EOL>
Custom grouping from a given implementation of ICustomGrouping

        :param customgrouper: The ICustomGrouping implemention to use