<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_initial(self):
 """ Try to find a demo source for given mode if any, if finded use it to fill the demo textarea. """

        initial = {}

        if self.kwargs.get('mode', None):
            filename = "{}.txt".format(self.kwargs['mode'])
            filepath = os.path.join(settings.BASE_DIR, 'demo_datas', filename)
            if os.path.exists(filepath):
                with io.open(filepath, 'r', encoding='utf-8') as fp:
                    initial['foo'] = fp.read()

        return initial