input: Write a python function to parse variable names from source code using the ast module.
  assert parse_variables("x = 10\ny = 20\nz = x + y") == ['x', 'y', 'z']
  assert parse_variables("a = 5\nb = 6\nc = a * b\ndef func():\n    d = 10") == ['a', 'b', 'c']
  assert parse_variables("m = 'hello'\nn = 'world'\ndef greet():\n    return m + ' ' + n") == ['m', 'n']
output: import ast
  
  def parse_variables(source_code):
      class VariableVisitor(ast.NodeVisitor):
          def __init__(self):
              self.variables = set()
          
          def visit_Assign(self, node):
              for target in node.targets:
                  if isinstance(target, ast.Name):
                      self.variables.add(target.id)
              self.generic_visit(node)
      
      tree = ast.parse(source_code)
      visitor = VariableVisitor()
      visitor.visit(tree)
      return sorted(visitor.variables)