input: Write a function to analyze the given Python function for any potential errors. The function should detect if list modification is being performed while iterating over it, which can lead to unexpected behavior. If such an error is detected, the function should suggest making a copy of the list before iterating.
  
  ### Function Header:
  def detect_list_modification_error(func_code: str) -> str:
  
  ### Assert Test Cases:
  assert detect_list_modification_error("""def expand_list(list):
      for item in list:
          list *= 2""") == "The function is attempting to modify the list while iterating over it. This can lead to unexpected behavior and should be avoided. To fix the code, the list should be copied before the iteration takes place: \ndef expand_list(list):\n    list_copy = list[:]   # make a copy of the list\n    for item in list_copy:\n        list *= 2"
  
  assert detect_list_modification_error("""def safe_expand_list(lst):
      lst_copy = lst[:]
      for item in lst_copy:
          lst_copy += [item * 2]""") == ""
  
  assert detect_list_modification_error("""def empty_func(lst):
      return lst""") == ""
output: def detect_list_modification_error(func_code: str) -> str:
      import ast
      tree = ast.parse(func_code)
      for node in ast.walk(tree):
          if isinstance(node, ast.For) and isinstance(node.iter, ast.Name) and isinstance(node.target, ast.Name):
              iter_name = node.iter.id
              target_name = node.target.id
              for body_node in node.body:
                  if isinstance(body_node, ast.AugAssign) and isinstance(body_node.target, ast.Name) and body_node.target.id == iter_name:
                      return f"The function is attempting to modify the list while iterating over it. This can lead to unexpected behavior and should be avoided. To fix the code, the list should be copied before the iteration takes place: \ndef {tree.body[0].name}({iter_name}):\n    {iter_name}_copy = {iter_name}[:]   # make a copy of the list\n    for {target_name} in {iter_name}_copy:\n        {iter_name} {ast.unparse(body_node)}"
      return ""