def METHOD_NAME(file_path):
    IMAGE_FILES = ['.eps','.ps','.png','.gif','.jpg','.jpeg']
    print(os.path.split(file_path)[1])
    ext = os.path.splitext(file_path)[1]
    if ext in IMAGE_FILES:
        # use ImageMagick 'identify' command which ignores file creation time
        # metadata in image header file and only hashes actual image data.
        # See https://stackoverflow.com/a/41706704
        checksum = subprocess.check_output('identify -format "%#" '+file_path, shell=True)
        checksum = checksum.split('\n')[0]
    else:
        # fallback method: system md5
        checksum = subprocess.check_output('md5sum '+file_path, shell=True)
        checksum = checksum.split(' ')[0]
    return checksum