<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_chain_dir_exists(self, warn_migration=False):
 """ Checks to make sure there is a directory called ``Chains`` at the root of DATA_DIR_PATH and creates it if it doesn't exist yet """

        chain_path = os.path.join(self.DATA_DIR_PATH, 'Chains')

        if not os.path.exists(chain_path):
            try:
                os.makedirs(chain_path)
                logger.info("Created 'Chains' directory at %s " % chain_path)
            except Exception as e:
                logger.error("Could not create 'Chains' directory at %s %s" % (chain_path, e))

        warn_migration = False
        # Add a warning for migration purposes if we created a chain dir
        if warn_migration and ROOT_INSTALL_PATH != self.DATA_DIR_PATH:
            if os.path.exists(os.path.join(ROOT_INSTALL_PATH, 'Chains')):
                logger.warning("[MIGRATION] You are now using the blockchain data at %s, but it appears you have existing data at %s/Chains" % (
                    chain_path, ROOT_INSTALL_PATH))
                logger.warning(
                    "[MIGRATION] If you would like to use your existing data, please move any data at %s/Chains to %s " % (ROOT_INSTALL_PATH, chain_path))
                logger.warning("[MIGRATION] Or you can continue using your existing data by starting your script with the `--datadir=.` flag")