code: def _callback_main(self, call, handler='edit_config', target='running',
                         source='startup'):
          
          try:
              if handler == 'get_config':
                  call = ET.tostring(call.getchildren()[0])
                  return self._mgr.get(filter=('subtree', call))
  
              call = ET.tostring(call)
              if handler == 'get':
                  call_element = xml_.to_ele(call)
                  return ET.fromstring(str(self._mgr.dispatch(call_element)))
              if handler == 'edit_config':
                  self._mgr.edit_config(target=target, config=call)
              if handler == 'delete_config':
                  self._mgr.delete_config(target=target)
              if handler == 'copy_config':
                  self._mgr.copy_config(target=target, source=source)
          except (ncclient.transport.TransportError,
                  ncclient.transport.SessionCloseError,
                  ncclient.transport.SSHError,
                  ncclient.transport.AuthenticationError,
                  ncclient.transport.SSHUnknownHostError) as error:
              logging.error(error)
              raise DeviceCommError
docs: Callback for NETCONF calls.
  
          Args:
              call: An Element Tree element containing the XML of the NETCONF
                  call you intend to make to the device.
              handler: Type of ncclient call to make.
                  get_config: NETCONF standard get config.
                  get: ncclient dispatch. For custom RPCs.
                  edit_config: NETCONF standard edit.
                  delete_config: NETCONF standard delete.
                  copy_config: NETCONF standard copy.
              target: Target configuration location for action. Only used for
                  edit_config, delete_config, and copy_config.
              source: Source of configuration information for copying
                  configuration. Only used for copy_config.
  
          Returns:
              None
  
          Raises:
              None