<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _submit_metrics(self, metrics, metric_name_and_type_by_property):
 """ Resolve metric names and types and submit it. """

        for metric in metrics:
            if (
                metric.name not in metric_name_and_type_by_property
                and metric.name.lower() not in metric_name_and_type_by_property
            ):
                # Only report the metrics that were specified in the configration
                # Ignore added properties like 'Timestamp_Sys100NS', `Frequency_Sys100NS`, etc ...
                continue

            if metric_name_and_type_by_property.get(metric.name):
                metric_name, metric_type = metric_name_and_type_by_property[metric.name]
            elif metric_name_and_type_by_property.get(metric.name.lower()):
                metric_name, metric_type = metric_name_and_type_by_property[metric.name.lower()]
            else:
                continue

            try:
                func = getattr(self, metric_type.lower())
            except AttributeError:
                raise Exception(u"Invalid metric type: {0}".format(metric_type))

            func(metric_name, metric.value, metric.tags)