<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def user_s3_bucket(canonical_user_id=None):
 """Get the user's S3 bucket."""

    s3 = _s3_resource()
    if not canonical_user_id:
        canonical_user_id = _get_canonical_aws_user_id(s3)

    s3_bucket_name = "dallinger-{}".format(
        hashlib.sha256(canonical_user_id.encode("utf8")).hexdigest()[0:8]
    )

    return _get_or_create_s3_bucket(s3, s3_bucket_name)