code: def check_path(file_path):
      '''
          Checks if the directories for this path exist, and creates them in case.
      '''
      directory = os.path.dirname(file_path)
      if directory != '':
          if not os.path.exists(directory):
              os.makedirs(directory, 0o775f check_path(file_path):
      '''
          Checks if the directories for this path exist, and creates them in case.
      '''
      directory = os.path.dirname(file_path)
      if directory != '':
          if not os.path.exists(directory):
              os.makedirs(directory, 0o775)
docs: Checks if the directories for this path exist, and creates them in case.