def delete_duplicate_files(self, list_of_files, parent_dir):
        """Delete the duplicate files from the given list of files.

        Args:
            list_of_files (list): list of file names to check duplicates.
            parent_dir (ShareDirectoryClient): ShareDirectory client object

        Raises:
            NetskopeException: Netskope Custom Exception.
        """
        __method_name = inspect.currentframe().f_code.co_name
        try:
            if len(list_of_files) == 1:
                return
            hashes = []
            for file in list_of_files:
                state_manager_obj = StateManager(consts.CONNECTION_STRING, file, self.share_name)
                file_data = state_manager_obj.get(consts.NETSKOPE_AZURE_STORAGE_TO_SENTINEL)
                hashes.append(hashlib.sha256(file_data.encode("utf-8")).hexdigest())
            duplicate_file_names = []
            applogger.info(list_of_files)
            for index, hashed_data in enumerate(hashes):
                is_hash_duplicate = hashed_data in hashes[:index]
                if is_hash_duplicate:
                    duplicate_file_names.append(list_of_files.pop(index))
            for duplicate_file in duplicate_file_names:
                self.delete_file_from_file_share(duplicate_file, parent_dir)
        except Exception as error:
            applogger.error(
                "{}(method={}) : {} : Error while deleting duplicates, Error-{}.".format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    consts.NETSKOPE_REMOVE_DUPLICATES,
                    error,
                )
            )
            raise NetskopeException()
Delete the duplicate files from the given list of files.

        Args:
            list_of_files (list): list of file names to check duplicates.
            parent_dir (ShareDirectoryClient): ShareDirectory client object

        Raises:
            NetskopeException: Netskope Custom Exception.
        
Solutions/Netskopev2/Data Connectors/NetskopeDataConnector/StorageToSentinel/remove_duplicates_in_azure_storage.py