def document_collection_method(section, resource_name, action_name,
                               event_emitter, collection_model, service_model,
                               include_signature=True):
    operation_model = service_model.operation_model(
        collection_model.request.operation)

    underlying_operation_members = []
    if operation_model.input_shape:
        underlying_operation_members = operation_model.input_shape.members

    example_resource_name = xform_name(resource_name)
    if service_model.service_name == resource_name:
        example_resource_name = resource_name

    custom_action_info_dict = {
        'all': {
            'method_description': (
                'Creates an iterable of all %s resources '
                'in the collection.' % collection_model.resource.type),
            'example_prefix': '%s_iterator = %s.%s.all' % (
                xform_name(collection_model.resource.type),
                example_resource_name, collection_model.name),
            'exclude_input': underlying_operation_members
        },
        'filter': {
            'method_description': (
                'Creates an iterable of all %s resources '
                'in the collection filtered by kwargs passed to '
                'method.' % collection_model.resource.type),
            'example_prefix': '%s_iterator = %s.%s.filter' % (
                xform_name(collection_model.resource.type),
                example_resource_name, collection_model.name),
            'exclude_input': get_resource_ignore_params(
                collection_model.request.params)
        },
        'limit': {
            'method_description': (
                'Creates an iterable up to a specified amount of '
                '%s resources in the collection.' %
                collection_model.resource.type),
            'example_prefix': '%s_iterator = %s.%s.limit' % (
                xform_name(collection_model.resource.type),
                example_resource_name, collection_model.name),
            'include_input': [
                DocumentedShape(
                    name='count', type_name='integer',
                    documentation=(
                        'The limit to the number of resources '
                        'in the iterable.'))],
            'exclude_input': underlying_operation_members
        },
        'page_size': {
            'method_description': (
                'Creates an iterable of all %s resources '
                'in the collection, but limits the number of '
                'items returned by each service call by the specified '
                'amount.' % collection_model.resource.type),
            'example_prefix': '%s_iterator = %s.%s.page_size' % (
                xform_name(collection_model.resource.type),
                example_resource_name, collection_model.name),
            'include_input': [
                DocumentedShape(
                    name='count', type_name='integer',
                    documentation=(
                        'The number of items returned by each '
                        'service call'))],
            'exclude_input': underlying_operation_members
        }
    }
    if action_name in custom_action_info_dict:
        action_info = custom_action_info_dict[action_name]
        document_model_driven_resource_method(
            section=section, method_name=action_name,
            operation_model=operation_model,
            event_emitter=event_emitter,
            resource_action_model=collection_model,
            include_signature=include_signature,
            **action_info
        )
Load a readline history file. The default filename is ~/.history.
dataset/ETHPy150Open boto/boto3/boto3/docs/collection.py/document_collection_method--crossover with--dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/python/Lib/site-packages/pyreadline/rlmain.py/Readline.read_history_file