class_docstr: Context manager for changing the current working directory
class_docstr_tok: ["Context","manager","for","changing","the","current","working","directory"]
code: def __init__(self, newPath):
      self.newPath = os.path.expanduser(newPath)
  
imports: import random
  import os
  import sys
  import collections
  import itertools
  import pickle
  import scipy.sparse
  import networkx
  import numpy
  from sklearn.cluster import SpectralClustering
  from sklearn import gaussian_process
  from scipy.optimize import minimize
  from bayes_opt import BayesianOptimization
label_desc: Use image node_id 1 to create a new cd object  with example: obj = cd(newPath)