code: def list_args(func: Callable) -> Callable:
      """Extend the function to allow taking a list as the first argument, and apply the function on each of the elements.
  
      Args:
          func: the function to extend
  
      Returns:
          The extended function
      """
  
      def inner(arg: Any, *args: Any, **kwargs: Any) -> Any:
          if isinstance(arg, list):
              return [func(v, *args, **kwargs) for v in arg]
  
          return func(arg, *args, **kwargs)
  
      return inner
  
imports: import decimal
  import math
  import re
  from datetime import timedelta
  from typing import Any, Callable, Dict, List, Optional, Union
  import numpy
  import pandas
  from markupsafe import escape
label_desc: Use image node_id 1 for calling a global function with example usage: list_args(func) and returns: inner, func, unknown