On the possibility of producing a nanocrystalline structure in magnesium and magnesium alloys