<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_collided_alias(collided_alias_dict):
 """ Write the collided aliases string into the collided alias file. """

        # w+ creates the alias config file if it does not exist
        open_mode = 'r+' if os.path.exists(GLOBAL_COLLIDED_ALIAS_PATH) else 'w+'
        with open(GLOBAL_COLLIDED_ALIAS_PATH, open_mode) as collided_alias_file:
            collided_alias_file.truncate()
            collided_alias_file.write(json.dumps(collided_alias_dict))