class_docstr: Optionally change the logging level and add a logging handler purely
  in the scope of the context manager:
  
  If you specify a level value, the logger’s level is set to that value
  in the scope of the with block covered by the context manager. If you
  specify a handler, it is added to the logger on entry to the block
  and removed on exit from the block. You can also ask the manager to
  close the handler for you on block exit - you could do this if you
  don’t need the handler any more.
  
  Stolen from [1]
  
  [1]:https://docs.python.org/3/howto/logging-cookbook.html#using-a-context-manager-for-selective-logging
class_docstr_tok: ["Optionally","change","the","logging","level","and","add","a","logging","handler","purely","in","the","scope","of","the","context","manager",":","If","you","specify","a","level","value",",","the","logger","\u2019","s","level","is","set","to","that","value","in","the","scope","of","the","with","block","covered","by","the","context","manager",".","If","you","specify","a","handler",",","it","is","added","to","the","logger","on","entry","to","the","block","and","removed","on","exit","from","the","block",".","You","can","also","ask","the","manager","to","close","the","handler","for","you","on","block","exit","-","you","could","do","this","if","you","don","\u2019","t","need","the","handler","any","more",".","Stolen","from","[","1","]","[","1","]",":","https",":","\/\/docs.python.org\/3\/howto\/logging-cookbook.html","#","using-a-context-manager-for-selective-logging"]
code: def __enter__(self):
      if self.level is not None:
          self.old_level = self.logger.level
          self.logger.setLevel(self.level)
  
      # The reasoning behind the last part of the below if statement:
      # What if this context is called multiple times with the same logger?
      # Then, only add loggers if they have different output streams
      if self.handler and not any(
          h.stream == self.handler.stream for h in self.logger.handlers
      ):
          self.logger.addHandler(self.handler)
  
file_path: dask-ml/dask_ml/_utils.py
imports: import time
  import dask.array
  import numpy
  from sklearn.base import BaseEstimator
label_desc: Use image node_id 2 for calling the LoggingContext obj's underlying member method code with example usage: obj.__enter__() without return types