(self, *parts)
return contextmanager(self.__unlocked)(*parts)
Unlock the given parts (default: all parts) of the table.

        The caller must ensure that the table is safe to modify. The function
        will raise an exception if the table contains view to other table.
Unlock the given parts (default: all parts) of the table.
Unlock the given parts ( default : all parts ) of the table .
def unlocked(self, *parts):
        """
        Unlock the given parts (default: all parts) of the table.

        The caller must ensure that the table is safe to modify. The function
        will raise an exception if the table contains view to other table.
        """
        def can_unlock(x):
            if sp.issparse(x):
                return can_unlock(x.data)
            return x.flags.writeable or x.flags.owndata or x.size == 0

        for part, flag, name in self._lock_parts_val():
            if not flag & self._unlocked \
                    and (not parts or any(ppart is part for ppart in parts)) \
                    and part is not None and not can_unlock(part):
                raise ValueError(f"'{name}' is a view into another table "
                                 "and cannot be unlocked")
        return contextmanager(self.__unlocked)(*parts)
def unlocked ( self , * parts ) : def can_unlock ( x ) : if sp . issparse ( x ) : return can_unlock ( x . data ) return x . flags . writeable or x . flags . owndata or x . size == 0 for part , flag , name in self . _lock_parts_val ( ) : if not flag & self . _unlocked and ( not parts or any ( ppart is part for ppart in parts ) ) and part is not None and not can_unlock ( part ) : raise ValueError ( f"'{name}' is a view into another table " "and cannot be unlocked" ) return contextmanager ( self . __unlocked ) ( * parts )