<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_version(path=None, module=None):
 """Return the version string. This function ensures that the version string complies with PEP 440. The format of our version string is: - for RELEASE builds: <major>.<minor> e.g. 0.1 2.4 - for DEVELOPMENT builds: <major>.<minor>.dev<num_branch_commits> \ +<branch_name>.g<short_git_sha>[.dirty] e.g. 1.1.dev34+new.shiny.feature.gfa973da 0.1.dev7+master.gb91ffa6.dirty - for UNKNOWN builds: 0.0+unknown.[<scm_type>.]<date> e.g. 0.0+unknown.svn.201402031023 0.0+unknown.201602081715 The <major>.<minor> substring for development builds will be that of the NEXT (minor) release, in order to allow proper Python version ordering. Parameters path : None or string, optional A file or directory to use to find the SCM or sdist checkout path (default is the current working directory) module : None or string, optional Get version via module name (e.g. __name__ variable), which takes precedence over path if provided (ignore otherwise) Returns ------- version: string A string representation of the package version """

    # Check the module option first.
    version = get_version_from_module(module)
    if version:
        return normalised(version)

    # Turn path into a valid directory (default is current directory)
    if path is None:
        path = os.getcwd()
    path = os.path.abspath(path)
    if os.path.exists(path) and not os.path.isdir(path):
        path = os.path.dirname(path)
    if not os.path.isdir(path):
        raise ValueError('No such package source directory: %r' % (path,))

    # Check for an sdist in the process of being installed by pip.
    version = get_version_from_unpacked_sdist(path)
    if version:
        return normalised(version)

    # Check the SCM.
    scm, version = get_version_from_scm(path)
    if version:
        return normalised(version)

    # Check if there is a katversion file in the given path.
    version = get_version_from_file(path)
    if version:
        return normalised(version)

    # None of the above got a version so we will make one up based on the date.
    return normalised(date_version(scm))