import io
import base64


def decode_b64_img(img_code: str) -> io.BytesIO:
    """ Returns a decoded image from base64 """

    img = img_code
    img_output = io.BytesIO(base64.b64decode(img))

    return img_output