def get_material_texture(material, index=0):
    """

    :param bpy.types.Material material:
    :param int index:
    :return:
    :rtype: bpy.types.ImageTexture
    """
    tex_slot = material.texture_slots[index]
    return tex_slot.texture