code: def create_customer(name, email, phone):
      
      Party = client.model('party.party')
      ContactMechanism = client.model('party.contact_mechanism')
  
      party, = Party.create([{'name': name}])
  
      # Bulk create the email and phone
      ContactMechanism.create([
          {'type': 'email', 'value': email, 'party': party},
          {'type': 'phone', 'value': phone, 'party': party},
      ])
  
      return party
docs: Create a customer with the name.
      Then attach the email and phone as contact methods