code: async def get_constraints(self):
          
          constraints = {}
          client_facade = client.ClientFacade.from_connection(self.connection())
          result = await client_facade.GetModelConstraints()
  
          # GetModelConstraints returns GetConstraintsResults which has a
          # 'constraints' attribute. If no constraints have been set
          # GetConstraintsResults.constraints is None. Otherwise
          # GetConstraintsResults.constraints has an attribute for each possible
          # constraint, each of these in turn will be None if they have not been
          # set.
          if result.constraints:
              constraint_types = [a for a in dir(result.constraints)
                                  if a in Value._toSchema.keys()]
              for constraint in constraint_types:
                  value = getattr(result.constraints, constraint)
                  if value is not None:
                      constraints[constraint] = getattr(result.constraints,
                                                        constraint)
          return constraints
docs: Return the machine constraints for this model.
  
          :returns: A ``dict`` of constraints.