code: def is_connection_error(e):
      
      return (isinstance(e, err.InterfaceError) and e.args[0] == "(0, '')") or\
          (isinstance(e, err.OperationalError) and e.args[0] in operation_error_codes.values())
docs: Checks if error e pertains to a connection issue