input: Write a function named `simplify_function` that takes a function definition as input and removes any redundant lines or expressions. The function should return the simplified function definition as a string. Ensure that the logic of the function remains unchanged.
  
  assert simplify_function("""def just_me(name):\n    print("Hi, my name is "+name+".")\n    print("I am special and nothing else matters.")\n    print("What about you?")"")=="""def just_me(name):\n    print("Hi, my name is "+name+". I am special and nothing else matters.")\n    print("What about you?")"""
  assert simplify_function("""def greet(name):\n    print("Hello, "+name)\n    print("Nice to meet you.")"")=="""def greet(name):\n    print("Hello, "+name+"Nice to meet you.")"""
  assert simplify_function("""def introduce(name, age):\n    print("My name is "+name)\n    print("I am "+str(age)+" years old.")"")=="""def introduce(name, age):\n    print("My name is "+name+"I am "+str(age)+" years old.")"""
  assert simplify_function("""def empty():\n    pass\n    pass""")=="""def empty():\n    pass"""
output: def simplify_function(func_def):
      import ast
      class SimplifyVisitor(ast.NodeVisitor):
          def __init__(self):
              self.lines = []
              self.current_line = ""
  
          def visit_Expr(self, node):
              if isinstance(node.value, ast.Call) and isinstance(node.value.func, ast.Name) and node.value.func.id == 'print':
                  if self.current_line:
                      self.current_line += " " + ast.unparse(node.value)
                  else:
                      self.current_line = ast.unparse(node.value)
              else:
                  if self.current_line:
                      self.lines.append(self.current_line)
                      self.current_line = ""
                  self.lines.append(ast.unparse(node))
              self.generic_visit(node)
  
          def visit_FunctionDef(self, node):
              self.lines.append(f"def {node.name}({', '.join(arg.arg for arg in node.args.args)}):")
              self.generic_visit(node)
              if self.current_line:
                  self.lines.append(self.current_line)
              return self.lines
  
      tree = ast.parse(func_def)
      visitor = SimplifyVisitor()
      simplified_lines = visitor.visit(tree)
      return "\n    ".join(simplified_lines)