def create_package(self, assay=None, mass=<NUM_LIT:0.0>, P=<NUM_LIT:1.0>, T=<NUM_LIT>,<EOL>normalise=True):
if assay is None:<EOL><INDENT>return MaterialPackage(self, self.create_empty_assay(), P, T)<EOL><DEDENT>if normalise:<EOL><INDENT>assay_total = self.get_assay_total(assay)<EOL><DEDENT>else:<EOL><INDENT>assay_total = <NUM_LIT:1.0><EOL><DEDENT>return MaterialPackage(self, mass * self.converted_assays[assay] /<EOL>assay_total, P, T, self._isCoal(assay),<EOL>self._get_HHV(assay))<EOL>
Create a MaterialPackage based on the specified parameters.

:param assay:     Name of the assay to be used to create the package.
:param mass:      Package mass. [kg]
:param P:         Package pressure. [atm]
:param T:         Package temperature. [°C]
:param normalise: Indicates whether the assay must be normalised
  before creating the package.

:returns: MaterialPackage object.