'Function which returns the extension lowercased
:param elem:
:return extension:'

def get_extension(self, elem):

    extension = elem.get('extension', None)
    if ((extension is not None) and (not extension.islower())):
        self.log.debug(('%s    is    not    lower    case,    that    could    cause    troubles    in    the    future.                                                    Please    change    it    to    lower    case' % extension))
        extension = extension.lower()
    return extension
