code: def need_to_create_symlink(directory, checksums, filetype, symlink_path):
      
      # If we don't have a symlink path, we don't need to create a symlink
      if symlink_path is None:
          return False
  
      pattern = NgdConfig.get_fileending(filetype)
      filename, _ = get_name_and_checksum(checksums, pattern)
      full_filename = os.path.join(directory, filename)
      symlink_name = os.path.join(symlink_path, filename)
  
      if os.path.islink(symlink_name):
          existing_link = os.readlink(symlink_name)
          if full_filename == existing_link:
              return False
  
      return True
docs: Check if we need to create a symlink for an existing file.