<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_url(self, url_or_dict):
 """ Returns the reversed url given a string or dict and prints errors if MENU_DEBUG is enabled """

        if isinstance(url_or_dict, basestring):
            url_or_dict = {'viewname': url_or_dict}
        try:
            return reverse(**url_or_dict)
        except NoReverseMatch:
            if MENU_DEBUG:
                print >>stderr,'Unable to reverse URL with kwargs %s' % url_or_dict