def METHOD_NAME(self, instance, skip_cleanup_filepaths):
    transfers = instance.data.get("transfers", list())
    current_families = instance.data.get("families", list())
    instance_family = instance.data.get("family", None)
    dirnames = []
    transfers_dirs = []
    for src, dest in transfers:
        # fix path inconsistency
        src = os.path.normpath(src)
        dest = os.path.normpath(dest)
        # add src dir into clearing dir paths (regex paterns)
        transfers_dirs.append(os.path.dirname(src))
        # add dest dir into clearing dir paths (regex paterns)
        transfers_dirs.append(os.path.dirname(dest))
        if src in skip_cleanup_filepaths:
            self.log.debug((
                "Source file is marked to be skipped in cleanup. {}"
            ).format(src))
            continue
        if os.path.normpath(src) != os.path.normpath(dest):
            if instance_family == 'render' or 'render' in current_families:
                self.log.info("Removing src: `{}`...".format(src))
                try:
                    os.remove(src)
                except PermissionError:
                    self.log.warning(
                        "Insufficient permission to delete {}".format(src)
                    )
                    continue
                # add dir for cleanup
                dirnames.append(os.path.dirname(src))
    # clean by regex paterns
    # make unique set
    transfers_dirs = set(transfers_dirs)
    self.log.debug("__ transfers_dirs: `{}`".format(transfers_dirs))
    self.log.debug("__ self.paterns: `{}`".format(self.paterns))
    if self.paterns:
        files = list()
        # get list of all available content of dirs
        for _dir in transfers_dirs:
            if not os.path.exists(_dir):
                continue
            files.extend([
                os.path.join(_dir, f)
                for f in os.listdir(_dir)])
        self.log.debug("__ files: `{}`".format(files))
        # remove all files which match regex patern
        for f in files:
            if os.path.normpath(f) in skip_cleanup_filepaths:
                continue
            for p in self.paterns:
                patern = re.compile(p)
                if not patern.findall(f):
                    continue
                if not os.path.exists(f):
                    continue
                self.log.info("Removing file by regex: `{}`".format(f))
                os.remove(f)
                # add dir for cleanup
                dirnames.append(os.path.dirname(f))
    # make unique set
    cleanup_dirs = set(dirnames)
    # clean dirs which are empty
    for dir in cleanup_dirs:
        try:
            os.rmdir(dir)
        except OSError:
            # directory is not empty, skipping
            continue