parameters: (cmd: List[str])
return_statement: return sanitized
docstring: Filter the command so that it no longer contains passwords
docstring_summary: Filter the command so that it no longer contains passwords
docstring_tokens: Filter the command so that it no longer contains passwords
function: def sanitize_args(cmd: List[str]) -> List[str]:
      """Filter the command so that it no longer contains passwords"""
      sanitized = []
      for idx, fieldname in enumerate(cmd):
  
          def _is_password(cmdstr):
              return "wifi-sec.psk" in cmdstr or "password" in cmdstr.lower()
  
          if idx > 0 and _is_password(cmd[idx - 1]):
              sanitized.append("****")
          else:
              sanitized.append(fieldname)
      return sanitized
function_tokens: def sanitize_args ( cmd : List [ str ] ) -> List [ str ] : sanitized = [ ] for idx , fieldname in enumerate ( cmd ) : def _is_password ( cmdstr ) : return "wifi-sec.psk" in cmdstr or "password" in cmdstr . lower ( ) if idx > 0 and _is_password ( cmd [ idx - 1 ] ) : sanitized . append ( "****" ) else : sanitized . append ( fieldname ) return sanitized