code: def automatic_density_by_vol(structure, kppvol, force_gamma=False):
          
          vol = structure.lattice.reciprocal_lattice.volume
          kppa = kppvol * vol * structure.num_sites
          return Kpoints.automatic_density(structure, kppa,
                                           force_gamma=force_gamma)
docs: Returns an automatic Kpoint object based on a structure and a kpoint
          density per inverse Angstrom^3 of reciprocal cell.
  
          Algorithm:
              Same as automatic_density()
  
          Args:
              structure (Structure): Input structure
              kppvol (int): Grid density per Angstrom^(-3) of reciprocal cell
              force_gamma (bool): Force a gamma centered mesh
  
          Returns:
              Kpoints