code: def get_instance(class_, **kwargs):
      """Create an instance of the given class with required kwargs.
  
      The exact keyword arguments that the given ``class_`` expects
      will be taken from ``kwargs`` and the rest will be ignored.
  
      Args:
          class_ (type):
              class to instantiate
          **kwargs:
              keyword arguments
  
      Returns:
          instance of specific class with the args that accepts.
      """
      init_args = getargs(class_.__init__)
      relevant_kwargs = {k: kwargs[k] for k in kwargs if k in init_args}
  
      return class_(**relevant_kwargs)
  
imports: from __future__ import absolute_import, unicode_literals
  import base64
  import hashlib
  import json
  import logging
  import os
  import pickle
  from builtins import str
  import numpy
  from atm.compat import getargs
label_desc: Use image node_id 9 for calling a global function with example usage: get_instance(class_) and returns: class_