def fix_arg(arg):
 if isinstance(arg, str):
  arg = _intrinsics.InvokeCommand.ExpandString(arg)
 elif isinstance(arg, PSObjectWrapper):
  arg = arg.data
 elif isinstance(arg, ShellOutput):
  arg = arg.data
 return arg

def fix_arg ( arg ) : if isinstance ( arg , str ) : arg = _intrinsics . InvokeCommand . ExpandString ( arg ) elif isinstance ( arg , PSObjectWrapper ) : arg = arg . data elif isinstance ( arg , ShellOutput ) : arg = arg . data return arg
utility function converts arg to type string .