import base64


def get_image(image_uri):
    """
        Loads a local png to be shown in dash

        Args:
            image_uri:  uri of the image

        Returns:
            the string to be placed in a html.Img container
    """
    with open(image_uri, "rb") as file:
        encoded = base64.b64encode(file.read())

    return f"data:image/png;base64,{encoded.decode()}"