Design a Python function to encode a given string using the base64 encoding scheme.
import base64 
def base64_encode(string):
    encodedBytes = base64.b64encode(string.encode("utf-8"))
    return str(encodedBytes, "utf-8")