def _prepare_fh(self, fh: typing.IO) -> typing.IO:
        '''
        Prepare the filehandle for usage

        If truncate is a number, the file will be truncated to that amount of
        bytes
        '''
        if self.truncate:
            fh.seek(0)
            fh.truncate(0)

        return fh

        Prepare the filehandle for usage

        If truncate is a number, the file will be truncated to that amount of
        bytes
        
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/portalocker/utils.py