<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_csv_from_metadata(dsn, d):
 """ Two goals. Get all csv from metadata, and return new metadata with generated filenames to match files. :param str dsn: Dataset name :param dict d: Metadata :return dict _csvs: Csv """

    logger_csvs.info("enter get_csv_from_metadata")
    _csvs = OrderedDict()
    _d = copy.deepcopy(d)

    try:
        if "paleoData" in _d:
            # Process paleoData section
            _d["paleoData"], _csvs = _get_csv_from_section(_d["paleoData"], "{}.paleo".format(dsn), _csvs)

        if "chronData" in _d:
            _d["chronData"], _csvs = _get_csv_from_section(_d["chronData"], "{}.chron".format(dsn), _csvs)

    except Exception as e:
        print("Error: get_csv_from_metadata: {}, {}".format(dsn, e))
        logger_csvs.error("get_csv_from_metadata: {}, {}".format(dsn, e))

    logger_csvs.info("exit get_csv_from_metadata")
    return _d, _csvs