def get_metadata(self, refresh=True):
if refresh or not self._metadata:<EOL><INDENT>ident = self._id or self.name<EOL>if not ident:<EOL><INDENT>raise ConuException(<EOL>"<STR_LIT>")<EOL><DEDENT>out = run_cmd(["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", ident], return_output=True, ignore_status=True)<EOL>if "<STR_LIT>" in out:<EOL><INDENT>self._metadata = {}<EOL><DEDENT>else:<EOL><INDENT>self._metadata = convert_kv_to_dict(out)<EOL><DEDENT><DEDENT>return self._metadata<EOL>
return cached metadata by default

:param refresh: bool, returns up to date metadata if set to True
:return: dict