def setCentre(self, *args, **kwargs):
try:<EOL><INDENT>centre = self.mambucentreclass(entid=self['<STR_LIT>'], *args, **kwargs)<EOL><DEDENT>except AttributeError as ae:<EOL><INDENT>from .mambucentre import MambuCentre<EOL>self.mambucentreclass = MambuCentre<EOL>centre = self.mambucentreclass(entid=self['<STR_LIT>'], *args, **kwargs)<EOL><DEDENT>self['<STR_LIT>'] = centre['<STR_LIT:name>']<EOL>self['<STR_LIT>'] = centre<EOL>return <NUM_LIT:1><EOL>
Adds the centre for this loan to a 'assignedCentre' field.

        Also adds an 'assignedCentreName' field with the name of the centre.

        Centre is a MambuCentre object.

        Returns the number of requests done to Mambu.