code: def setCentre(self, *args, **kwargs):
          
  
          try:
              centre = self.mambucentreclass(entid=self['assignedCentreKey'], *args, **kwargs)
          except AttributeError as ae:
              from .mambucentre import MambuCentre
              self.mambucentreclass = MambuCentre
              centre = self.mambucentreclass(entid=self['assignedCentreKey'], *args, **kwargs)
  
          self['assignedCentreName'] = centre['name']
          self['assignedCentre'] = centre
  
          return 1
docs: 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.