python find material that is not used
Like Chebhou mentioned, you can use material.users to find out how many users there.

So you should use this in your method:

def is_used(material):
    if material.users == 0:
        return False
    else:
        return True


Or because it is a very simple condition, it would be more effective to not use a separate function at all:

for material in bpy.data.materials:
    if material.users == 0:
        print('material %s is not used' % material)


Also, the new str.format() in Python 3 should be used to fit the new standard (but it isn't really necessary). You can also use material.name for a prettier output.

print('material {} is not used'.format(material.name))