parameters: (self, memory_info=None, address=None)
docstring: Erase the device or parts of it.
  
          :param memory_info: dictionary for the memory as provided by the DeviceMemoryInfo class
              If memory_info is None the default bulk erase will be run
          :param address: address info for erase (optional)
docstring_summary: Erase the device or parts of it.
docstring_tokens: Erase the device or parts of it .
function: def erase(self, memory_info=None, address=None):
          """
          Erase the device or parts of it.
  
          :param memory_info: dictionary for the memory as provided by the DeviceMemoryInfo class
              If memory_info is None the default bulk erase will be run
          :param address: address info for erase (optional)
          """
          if address is None:
              if memory_info is None:
                  self.pic.erase()
              else:
                  if memory_info[DeviceInfoKeys.NAME] == MemoryNames.ICD:
                      self.pic.erase_de_memory(memory_info[DeviceMemoryInfoKeys.ADDRESS],
                                               memory_info[DeviceMemoryInfoKeys.SIZE])
                  else:
                      if DeviceMemoryInfoKeys.ERASE_ADDRESS in memory_info:
                          self.pic.erase(memory_info[DeviceMemoryInfoKeys.ERASE_ADDRESS])
                      else:
                          raise ValueError("Missing erase address for {}".format(memory_info[DeviceInfoKeys.NAME]))
          else:
              self.pic.erase(address)
function_tokens: def erase ( self , memory_info = None , address = None ) : if address is None : if memory_info is None : self . pic . erase ( ) else : if memory_info [ DeviceInfoKeys . NAME ] == MemoryNames . ICD : self . pic . erase_de_memory ( memory_info [ DeviceMemoryInfoKeys . ADDRESS ] , memory_info [ DeviceMemoryInfoKeys . SIZE ] ) else : if DeviceMemoryInfoKeys . ERASE_ADDRESS in memory_info : self . pic . erase ( memory_info [ DeviceMemoryInfoKeys . ERASE_ADDRESS ] ) else : raise ValueError ( "Missing erase address for {}" . format ( memory_info [ DeviceInfoKeys . NAME ] ) ) else : self . pic . erase ( address )