def key_function(row, index):
    """
    This example shows how to define a function to extract X and Y values
    from custom data.

    :param row:
        The function will be called with the row data, in whatever format it
        was provided to the :class:`.Series`.
    :param index:
        The row index in the series data will also be provided.
    :returns:
        The function must return a chartable value.
    """
    pass
