<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_texture(filename, attrs=None):
 """Loads a ``vtkTexture`` from an image file."""

    filename = os.path.abspath(os.path.expanduser(filename))
    try:
        # intitialize the reader using the extnesion to find it
        reader = get_reader(filename)
        image = standard_reader_routine(reader, filename, attrs=attrs)
        return vtki.image_to_texture(image)
    except KeyError:
        # Otherwise, use the imageio reader
        pass
    return vtki.numpy_to_texture(imageio.imread(filename))