Extract and parse Avro schema from a read session.

    Args:
        read_session ( \
            ~google.cloud.bigquery_storage_v1beta1.types.ReadSession \
        ):
            The read session associated with this read rows stream. This
            contains the schema, which is required to parse the data
            blocks.

    Returns:
        Tuple[fastavro.schema, Tuple[str]]:
            A parsed Avro schema, using :func:`fastavro.schema.parse_schema`
            and the column names for a read session.

def _avro_schema(read_session):
    """Extract and parse Avro schema from a read session.

    Args:
        read_session ( \
            ~google.cloud.bigquery_storage_v1beta1.types.ReadSession \
        ):
            The read session associated with this read rows stream. This
            contains the schema, which is required to parse the data
            blocks.

    Returns:
        Tuple[fastavro.schema, Tuple[str]]:
            A parsed Avro schema, using :func:`fastavro.schema.parse_schema`
            and the column names for a read session.
    """
    json_schema = json.loads(read_session.avro_schema.schema)
    column_names = tuple((field["name"] for field in json_schema["fields"]))
    return fastavro.parse_schema(json_schema), column_names