<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _basename(station_code, fmt=None):
 """region, country, weather_station, station_code, data_format, url."""

    info = _station_info(station_code)
    if not fmt:
        fmt = info['data_format']
    basename = '%s.%s' % (info['url'].rsplit('/', 1)[1].rsplit('.', 1)[0],
                          DATA_EXTENTIONS[fmt])
    return basename