code: def safe_get(d, key, def_val=None):
      
      if d.has_key(key):
          return d[key]
      else:
          return def_val
docs: Helper function to fetch value from a dictionary
      
      * `d` - Dictionary to fetch value from
      * `key` - Key to lookup in dictionary
      * `def_val` - Default value to return if dict does not have a member with key