def setns(fd, nstype):
res = lib.setns(fd, nstype)<EOL>if res != <NUM_LIT:0>:<EOL><INDENT>_check_error(ffi.errno)<EOL><DEDENT>
Reassociate thread with a namespace

:param fd int: The file descriptor referreing to one of the namespace
    entries in a :directory::`/proc/<pid>/ns/` directory.
:param nstype int: The type of namespace the calling thread should be
    reasscoiated with.