'Return a metric name (string) representing the provided descriptors.
The return value is directly usable for custom NR metrics.'

def _nr_metric_name(self, function_name, stat_name, block_type=None):

    if (block_type is None):
        metric_name_parts = ['xb_user_state', function_name, stat_name]
    else:
        metric_name_parts = ['xb_user_state', function_name, block_type, stat_name]
    return '.'.join(metric_name_parts)
