def is_valid_metric_name(metric_name):
reg = re.compile('<STR_LIT>')<EOL>if reg.match(metric_name) and not metric_name.startswith('<STR_LIT:.>'):<EOL><INDENT>return True<EOL><DEDENT>else:<EOL><INDENT>return False<EOL><DEDENT>
check the validity of metric_name in config; the metric_name will be used for creation of sub-dir, so only contains: alphabet, digits , '.', '-' and '_'
:param str metric_name: metric_name
:return: True if valid