code: def _tag_matches(tags, filter):
          
          for tag_name, tag_value in filter.items():
              # using _sentinel as I'm not sure that "None"
              # could be used, because it could be a valid
              # series_tags value : when a series has no such tag
              # then I think it's set to /null/None/.. TBC..
              series_tag_value = tags.get(tag_name, _sentinel)
              if series_tag_value != tag_value:
                  return False
  
          return True
docs: Check if all key/values in filter match in tags.