(mib, parsed_table, metric_tag)
Parsed an item of the `metric_tags` section of a table metric.

    Items can be:

    * A reference to a column in the same table.

    Example using entPhySensorTable in ENTITY-SENSOR-MIB:

    ```
    metric_tags:
      - tag: sensor_type
        column: entPhySensorType
        # OR
        column:
        OID: 1.3.6.1.2.1.99.1.1.1.1
        name: entPhySensorType
    ```

    * A reference to a column in a different table.

    Example:

    ```
    metric_tags:
      - tag: adapter
        table: genericAdaptersAttrTable
        column: adapterName
        # OR
        column:
          OID: 1.3.6.1.4.1.343.2.7.2.2.1.1.1.2
          name: adapterName
    ```

    * A reference to an OID by its index in the table entry.

    An optional `mapping` can be used to map index values to human-readable strings.

    Example using ipIfStatsTable in IP-MIB:

    ```
    metric_tags:
      - # ipIfStatsIPVersion (1.3.6.1.2.1.4.21.3.1.1)
        tag: ip_version
        index: 1
        mapping:
          0: unknown
          1: ipv4
          2: ipv6
          3: ipv4z
          4: ipv6z
          16: dns
      - # ipIfStatsIfIndex (1.3.6.1.2.1.4.21.3.1.2)
        tag: interface
        index: 2
    ```
Parsed an item of the `metric_tags` section of a table metric.
Parsed an item of the metric_tags section of a table metric .
def _parse_table_metric_tag(mib, parsed_table, metric_tag):
    # type: (str, ParsedSymbol, TableMetricTag) -> ParsedTableMetricTag
    """
    Parsed an item of the `metric_tags` section of a table metric.

    Items can be:

    * A reference to a column in the same table.

    Example using entPhySensorTable in ENTITY-SENSOR-MIB:

    ```
    metric_tags:
      - tag: sensor_type
        column: entPhySensorType
        # OR
        column:
        OID: 1.3.6.1.2.1.99.1.1.1.1
        name: entPhySensorType
    ```

    * A reference to a column in a different table.

    Example:

    ```
    metric_tags:
      - tag: adapter
        table: genericAdaptersAttrTable
        column: adapterName
        # OR
        column:
          OID: 1.3.6.1.4.1.343.2.7.2.2.1.1.1.2
          name: adapterName
    ```

    * A reference to an OID by its index in the table entry.

    An optional `mapping` can be used to map index values to human-readable strings.

    Example using ipIfStatsTable in IP-MIB:

    ```
    metric_tags:
      - # ipIfStatsIPVersion (1.3.6.1.2.1.4.21.3.1.1)
        tag: ip_version
        index: 1
        mapping:
          0: unknown
          1: ipv4
          2: ipv6
          3: ipv4z
          4: ipv6z
          16: dns
      - # ipIfStatsIfIndex (1.3.6.1.2.1.4.21.3.1.2)
        tag: interface
        index: 2
    ```
    """
    if 'column' in metric_tag:
        metric_tag = cast(ColumnTableMetricTag, metric_tag)
        metric_tag_mib = metric_tag.get('MIB', mib)

        if 'table' in metric_tag:
            return _parse_other_table_column_metric_tag(metric_tag_mib, metric_tag['table'], metric_tag)

        if mib != metric_tag_mib:
            raise ConfigurationError('When tagging from a different MIB, the table must be specified')

        return _parse_column_metric_tag(mib, parsed_table, metric_tag)

    if 'index' in metric_tag:
        metric_tag = cast(IndexTableMetricTag, metric_tag)
        return _parse_index_metric_tag(metric_tag)

    raise ConfigurationError('When specifying metric tags, you must specify either and index or a column')
def _parse_table_metric_tag ( mib , parsed_table , metric_tag ) : # type: (str, ParsedSymbol, TableMetricTag) -> ParsedTableMetricTag if 'column' in metric_tag : metric_tag = cast ( ColumnTableMetricTag , metric_tag ) metric_tag_mib = metric_tag . get ( 'MIB' , mib ) if 'table' in metric_tag : return _parse_other_table_column_metric_tag ( metric_tag_mib , metric_tag [ 'table' ] , metric_tag ) if mib != metric_tag_mib : raise ConfigurationError ( 'When tagging from a different MIB, the table must be specified' ) return _parse_column_metric_tag ( mib , parsed_table , metric_tag ) if 'index' in metric_tag : metric_tag = cast ( IndexTableMetricTag , metric_tag ) return _parse_index_metric_tag ( metric_tag ) raise ConfigurationError ( 'When specifying metric tags, you must specify either and index or a column' )