code: def setBranch(self, *args, **kwargs):
          
  
          try:
              branch = self.mambubranchclass(entid=self['assignedBranchKey'], *args, **kwargs)
          except AttributeError as ae:
              from .mambubranch import MambuBranch
              self.mambubranchclass = MambuBranch
              branch = self.mambubranchclass(entid=self['assignedBranchKey'], *args, **kwargs)
          self['assignedBranchName'] = branch['name']
          self['assignedBranch'] = branch
  
          return 1
docs: Adds the branch to which the client belongs.