code: def upload_model(self, ndex_cred=None, private=True, style='default'):
          
          cx_str = self.print_cx()
          if not ndex_cred:
              username, password = ndex_client.get_default_ndex_cred({})
              ndex_cred = {'user': username,
                           'password': password}
          network_id = ndex_client.create_network(cx_str, ndex_cred, private)
          if network_id and style:
              template_id = None if style == 'default' else style
              ndex_client.set_style(network_id, ndex_cred, template_id)
          return network_id
docs: Creates a new NDEx network of the assembled CX model.
  
          To upload the assembled CX model to NDEx, you need to have
          a registered account on NDEx (http://ndexbio.org/) and have
          the `ndex` python package installed. The uploaded network
          is private by default.
  
          Parameters
          ----------
          ndex_cred : Optional[dict]
              A dictionary with the following entries:
              'user': NDEx user name
              'password': NDEx password
          private : Optional[bool]
              Whether or not the created network will be private on NDEX.
          style : Optional[str]
              This optional parameter can either be (1)
              The UUID of an existing NDEx network whose style should be applied
              to the new network. (2) Unspecified or 'default' to use
              the default INDRA-assembled network style. (3) None to
              not set a network style.
  
          Returns
          -------
          network_id : str
              The UUID of the NDEx network that was created by uploading
              the assembled CX model.