code: def get_default_ndex_cred(ndex_cred):
      
      if ndex_cred:
          username = ndex_cred.get('user')
          password = ndex_cred.get('password')
  
          if username is not None and password is not None:
              return username, password
  
      username = get_config('NDEX_USERNAME')
      password = get_config('NDEX_PASSWORD')
  
      return username, password
docs: Gets the NDEx credentials from the dict, or tries the environment if None