Dialysis machines are not able to replace this part of the kidney 's function . Dialysis is an imperfect treatment to replace kidney function because it does not correct the endocrine functions of the kidney .