def METHOD_NAME(self, argument):
    """
    Raise exception when yang validation failed
    """
    if PY3x and "-m" in argument:
        import sonic_yang
        parser=argparse.ArgumentParser(description="Render configuration file from minigraph data and jinja2 template.")
        parser.add_argument("-m", "--minigraph", help="minigraph xml file", nargs='?', const='/etc/sonic/minigraph.xml')
        parser.add_argument("-k", "--hwsku", help="HwSKU")
        parser.add_argument("-n", "--namespace", help="namespace name", nargs='?', const=None, default=None)
        parser.add_argument("-p", "--port-config", help="port config file, used with -m or -k", nargs='?', const=None)
        parser.add_argument("-S", "--hwsku-config", help="hwsku config file, used with -p and -m or -k", nargs='?', const=None)
        parser.add_argument("-j", "--json", help="additional json file input, used with -p, -S and -m or -k", nargs='?', const=None)
        args, unknown = parser.parse_known_args(argument)
        print('\n    Validating yang schema')
        cmd = self.script_file + ['-m', args.minigraph]
        if args.hwsku is not None:
            cmd += ['-k', args.hwsku]
        if args.hwsku_config is not None:
            cmd += ['-S', args.hwsku_config]
        if args.port_config is not None:
            cmd += ['-p', args.port_config]
        if args.namespace is not None:
            cmd += ['-n', args.namespace]
        if args.json is not None:
            cmd += ['-j', args.json]
        cmd += ['--print-data']
        output = subprocess.check_output(cmd).decode()
        try:
            self.yang_parser.loadData(configdbJson=json.loads(output))
            self.yang_parser.validate_data_tree()
        except sonic_yang.SonicYangException as e:
            print("yang data generated from %s is not valid: %s"%(args.minigraph, str(e)))
            return False
        if len(self.yang_parser.tablesWithOutYang):
            return False
    return True