<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_dir(dst):
 """create directory if necessary :param dst: """

    directory = os.path.dirname(dst)
    if directory and not os.path.exists(directory):
        os.makedirs(directory)