title: Recursive function to check dictionary is a subset of another dictionary
body: <p>I'd like to check whether a dictionary is a subset of another dictionary recursively. Let's assume both dictionaries having builtin types as items.</p>
  
  <p>I've seen there is already a very old thread <a href="https://stackoverflow.com/questions/9323749/python-check-if-one-dictionary-is-a-subset-of-another-larger-dictionary">Python: Check if one dictionary is a subset of another larger dictionary</a> trying to solve something similar but not quite... Because none of the answers living there will serve for my purposes I've decided to post my own <a href="https://stackoverflow.com/a/49418622/3809375">solution</a> in there but it is still not fully complete, the below function is working ok for almost all cases but it fails miserably in cases when the subset has values that don't exist in the superset, ie:</p>
  
  <pre><code>def is_subset(superset, subset):
      for key, value in superset.items():
          if key not in subset:
              continue
  
          if isinstance(value, dict):
              if not is_subset(value, subset[key]):
                  return False
          elif isinstance(value, str):
              if not subset[key] in value:
                  return False
          elif isinstance(value, list):
              if not set(subset[key]) &lt;= set(value):
                  return False
          elif isinstance(value, set):
              if not subset[key] &lt;= value:
                  return False
          else:
              if not subset[key] == value:
                  return False
  
      return True
  
  superset = {'question': 'mcve', 'metadata': {}}
  subset = {'question': 'mcve', 'metadata': {'author': 'BPL'}}
  
  print(is_subset(superset, subset))
  </code></pre>
  
  <p>The function returns True but it should return False. So, how would you fix it?</p>