def _render_sources(dataset, tables):
    """Render the source part of a query.

    Parameters
    ----------
    dataset : str
        The data set to fetch log data from.
    tables : Union[dict, list]
        The tables to fetch log data from

    Returns
    -------
    str
        A string that represents the "from" part of a query.
    """

    if isinstance(tables, dict):
        if tables.get('date_range', False):
            try:
                dataset_table = '.'.join([dataset, tables['table']])
                return "FROM (TABLE_DATE_RANGE([{}], TIMESTAMP('{}'),"\
                    " TIMESTAMP('{}'))) ".format(dataset_table,
                                                 tables['from_date'],
                                                 tables['to_date'])
            except __HOLE__ as exp:
                logger.warn(
                    'Missing parameter %s in selecting sources' % (exp))

    else:
        return "FROM " + ", ".join(
            ["[%s.%s]" % (dataset, table) for table in tables])
dataset/ETHPy150Open tylertreat/BigQuery-Python/bigquery/query_builder.py/_render_sources