def format_tile(tile, tile_format, format_str='{x} {y} {z}'):
    """Convert tile to necessary format.

    Parameters
    ----------
    tile: pygeotile.tile.Tile
        Tile object to be formatted.
    tile_format: str
        Desired tile format. `google`, `tms`, or `quad_tree`
    format_str: str
        String to guide formatting. Only used for `google` or `tms`
        (as quad_tree is one value).
        Default: "{x} {y} {z}". Example: "{z}-{x}-{y}"
    """

    if tile_format == 'google':
        td = {key: val for key, val
              in zip(['x', 'y', 'z'], list(tile.google) + [tile.zoom])}
        return format_str.format(**td)

    elif tile_format == 'tms':
        td = {key: val for key, val
              in zip(['x', 'y', 'z'], list(tile.tms) + [tile.zoom])}
        return format_str.format(**td)

    elif tile_format == 'quad_tree':
        return tile.quad_tree

    else:
        raise ValueError('`tile_format`: {} not recognized'.format(tile_format))