<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_rst_file(file_directory, file_name, content):
 """Shorter procedure for creating rst file. :param file_directory: Directory of the filename. :type file_directory: str :param file_name: Name of the file. :type file_name: str :param content: The content of the file. :type content: str """

    create_dirs(os.path.split(os.path.join(file_directory, file_name))[0])
    try:
        fl = open(os.path.join(file_directory, file_name + '.rst'), 'w+')
        fl.write(content)
        fl.close()

    except Exception as e:
        print(('Creating %s failed' % os.path.join(
            file_directory, file_name + '.rst'), e))