code: def add_doi(self, doi, source=None, material=None):
          
          if doi is None:
              return
  
          try:
              doi = idutils.normalize_doi(doi)
          except AttributeError:
              return
  
          if not doi:
              return
  
          dois = self._sourced_dict(
              source,
              value=doi
          )
          if material is not None:
              dois['material'] = material
  
          self._append_to('dois', dois)
docs: Add doi.
  
          :param doi: doi for the current document.
          :type doi: string
  
          :param source: source for the doi.
          :type source: string
  
          :param material: material for the doi.
          :type material: string