<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def metadata_matches(self, query={}):
 """ Returns key matches to metadata This will check every key in query for a matching key in metadata returning true if every key is in metadata. query without keys return false. Args: query(object):
 metadata for matching Returns: bool: True: when key count in query is > 0 and all keys in query in self.metadata False: if key count in query is <= 0 or any key in query not found in self.metadata """

        result = len(query.keys()) > 0
        for key in query.keys():
            result = result and query[key] == self.metadata.get(key)

        return result