human
I wrote the below code

    import kappa.function
    import kappa.restapi
    import kappa.event_source.dynamodb_stream
    import kappa.event_source.kinesis
    import kappa.event_source.s3
    import kappa.event_source.sns
    import kappa.event_source.cloudwatch
    import kappa.policy
    import kappa.role
    import kappa.awsclient
    class PseudoContext(object, ):
        def __init__(self):
            return
    class PseudoFunction(object, ):
        def __init__(self):
            return
    event_source_map = {'dynamodb': kappa.event_source.dynamodb_stream.DynamoDBStreamEventSource, 'kinesis': kappa.event_source.kinesis.KinesisEventSource, 's3': kappa.event_source.s3.S3EventSource, 'sns': kappa.event_source.sns.SNSEventSource, 'events': kappa.event_source.cloudwatch.CloudWatchEventSource}
    arn = event_source['arn']
    (_, _, svc, _) = arn.split(':', 3)
    event_source_func = event_source_map.get(svc, None)
    if (not event_source_func):
        raise ValueError('Unknown    event    source:    {0}'.format(arn))
    def autoreturn(self, function_name):
        return function_name
    event_source_func._make_notification_id = autoreturn
    ctx = PseudoContext()
    ctx.session = boto_session
    funk = PseudoFunction()
    funk.name = lambda_arn
    if (svc == 's3'):
        split_arn = lambda_arn.split(':')
        arn_front = ':'.join(split_arn[:(-1)])
        arn_back = split_arn[(-1)]
        ctx.environment = arn_back
        funk.arn = arn_front
        funk.name = ':'.join([arn_back, target_function])
    else:
        funk.arn = lambda_arn
    funk._context = ctx
    event_source_obj = event_source_func(ctx, event_source)
    return (event_source_obj, ctx, funk)

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def get_event_source(event_source, lambda_arn, target_function, boto_session, dry=False):