def METHOD_NAME(
    data: List[ListElement], use_bytes: bool = True
) -> Tuple[List[ListElement], Optional[str]]:
    # To ensure that "string" columns can be encoded in gRPC, we need to
    # encode them as bytes.
    # We'll also keep track of whether the list should be treated in the
    # future as a list of strings.
    processed = []
    content_type: Optional[str] = StringCodec.ContentType
    for elem in data:
        converted = elem
        if not isinstance(elem, str):
            # There was a non-string element, so we can't determine a content
            # type
            content_type = None
        elif use_bytes:
            converted = encode_str(elem)
        processed.append(converted)
    return processed, content_type