'Batch import all of the users activities and distributes
them to the users followers
**Example**::
activities = [long list of activities]
stream_framework.batch_import(13, activities, 500)
:param user_id: the user who created the activities
:param activities: a list of activities from this user
:param fanout: if we should run the fanout or not
:param chunk_size: per how many activities to run the batch operations'

def batch_import(self, user_id, activities, fanout=True, chunk_size=500):

    activities = list(activities)
    if (not activities):
        return
    logger.info('running    batch    import    for    user    %s', user_id)
    user_feed = self.get_user_feed(user_id)
    if (activities[0].actor_id != user_id):
        raise ValueError('Send    activities    for    only    one    user    please')
    activity_chunks = list(chunks(activities, chunk_size))
    logger.info('processing    %s    items    in    %s    chunks    of    %s', len(activities), len(activity_chunks), chunk_size)
    for (index, activity_chunk) in enumerate(activity_chunks):
        self.user_feed_class.insert_activities(activity_chunk)
        logger.info('inserted    chunk    %s    (length    %s)    into    the    global    activity    store', index, len(activity_chunk))
        user_feed.add_many(activity_chunk, trim=False)
        logger.info('inserted    chunk    %s    (length    %s)    into    the    user    feed', index, len(activity_chunk))
        if fanout:
            logger.info('starting    task    fanout    for    chunk    %s', index)
            follower_ids_by_prio = self.get_user_follower_ids(user_id=user_id)
            operation_kwargs = dict(activities=activity_chunk, trim=False)
            for feed_class in self.feed_classes.values():
                for (priority_group, fids) in follower_ids_by_prio.items():
                    self.create_fanout_tasks(fids, feed_class, add_operation, fanout_priority=priority_group, operation_kwargs=operation_kwargs)
