===== ISTEM =====
Solve the following programming task.

TASK: Semantic Version Compare

Write a function 'compare_version(v1, v2)' that compares two version numbers (e.g. '1.01.2' and '1.1.2'). It must return 1 if v1 > v2, -1 if v1 < v2, and 0 if they are equal. Leading zeros in the dot-separated parts are insignificant.

STARTER CODE (python):
def compare_version(v1: str, v2: str) -> int:
    # Write your code here
    pass


RULES:
- Keep the function name and signature EXACTLY as given.
- Return working code only. No explanations.
- Put the code in a single ``` block.
- Try to solve it first. If you genuinely cannot, write only this single
  line instead of producing faulty code: CANNOT_SOLVE

===== HAM YANIT =====
```python
def compare_version(v1: str, v2: str) -> int:
    v1_parts = [int(part) for part in v1.split('.')]
    v2_parts = [int(part) for part in v2.split('.')]
    
    max_length = max(len(v1_parts), len(v2_parts))
    v1_parts += [0] * (max_length - len(v1_parts))
    v2_parts += [0] * (max_length - len(v2_parts))
    
    for v1_part, v2_part in zip(v1_parts, v2_parts):
        if v1_part > v2_part:
            return 1
        elif v1_part < v2_part:
            return -1
    
    return 0
```