def METHOD_NAME(tex_path):
    """Returns an image or a generated image if none was found"""
    name = os.path.basename(tex_path)
    if name not in bpy.data.images:
        try:
            b_image = bpy.data.images.load(tex_path)
        except:
            NifLog.warn(f"Texture '{name}' not found or not supported and no alternate available")
            b_image = bpy.data.images.new(name=name, width=1, height=1, alpha=True)
            b_image.filepath = tex_path
    else:
        b_image = bpy.data.images[name]
    return b_image