<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _upload_function(s3_conn, bucket, prefix, name, options, follow_symlinks, payload_acl):
 """Builds a Lambda payload from user configuration and uploads it to S3. Args: s3_conn (botocore.client.S3):
 S3 connection to use for operations. bucket (str):
 name of the bucket to upload to. prefix (str):
 S3 prefix to prepend to the constructed key name for the uploaded file name (str):
 desired name of the Lambda function. Will be used to construct a key name for the uploaded file. options (dict):
 configuration for how to build the payload. Consists of the following keys: * path: base path to retrieve files from (mandatory). If not absolute, it will be interpreted as relative to the stacker configuration file directory, then converted to an absolute path. See :func:`stacker.util.get_config_directory`. * include: file patterns to include in the payload (optional). * exclude: file patterns to exclude from the payload (optional). follow_symlinks (bool):
 If true, symlinks will be included in the resulting zip file payload_acl (str):
 The canned S3 object ACL to be applied to the uploaded payload Returns: troposphere.awslambda.Code: CloudFormation AWS Lambda Code object, pointing to the uploaded object in S3. Raises: ValueError: if any configuration is invalid. botocore.exceptions.ClientError: any error from boto3 is passed through. """

    try:
        root = os.path.expanduser(options['path'])
    except KeyError as e:
        raise ValueError(
            "missing required property '{}' in function '{}'".format(
                e.args[0], name))

    includes = _check_pattern_list(options.get('include'), 'include',
                                   default=['**'])
    excludes = _check_pattern_list(options.get('exclude'), 'exclude',
                                   default=[])

    logger.debug('lambda: processing function %s', name)

    # os.path.join will ignore other parameters if the right-most one is an
    # absolute path, which is exactly what we want.
    if not os.path.isabs(root):
        root = os.path.abspath(os.path.join(get_config_directory(), root))
    zip_contents, content_hash = _zip_from_file_patterns(root,
                                                         includes,
                                                         excludes,
                                                         follow_symlinks)

    return _upload_code(s3_conn, bucket, prefix, name, zip_contents,
                        content_hash, payload_acl)