code: def extract_arguments(args, defaults):
      
      out_dict = convert_option_dict_to_dict(defaults)
      for key in defaults.keys():
          mapped_val = args.get(key, None)
          if mapped_val is None:
              pass
          else:
              out_dict[key] = mapped_val
      return out_dict
docs: Extract a set of arguments from a large dictionary
  
      Parameters
      ----------
  
      args : dict
          Dictionary with the arguments values to use
  
      defaults : dict
          Dictionary with all the argument to extract, and default values for each
  
      Returns
      -------
  
      out_dict : dict
          A dictionary with only the extracted arguments