<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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 KeyError as exp:
                logger.warn(
                    'Missing parameter %s in selecting sources' % (exp))

    else:
        return "FROM " + ", ".join(
            ["[%s.%s]" % (dataset, table) for table in tables])