def METHOD_NAME(labels: List) -> List[metrics_pb2.LabelPair]:
    """
    Try to convert both the label names and label values to LabelPair protobuf objects.
    Defaults to the given name and value if it fails to convert.
    Arguments:
        labels: an array of label pairs with name and value properties
    Returns:
        an array of protobuf LabelPair objects with name and value properties 
    """
    return [metrics_pb2.LabelPair(name=name, value=value) for name, value in labels]