code: def role_create(role, principal, endpoint_id):
      
      principal_type, principal_val = principal
  
      client = get_client()
  
      if principal_type == "identity":
          principal_val = maybe_lookup_identity_id(principal_val)
          if not principal_val:
              raise click.UsageError(
                  "Identity does not exist. "
                  "Use --provision-identity to auto-provision an identity."
              )
      elif principal_type == "provision-identity":
          principal_val = maybe_lookup_identity_id(principal_val, provision=True)
          principal_type = "identity"
  
      role_doc = assemble_generic_doc(
          "role", principal_type=principal_type, principal=principal_val, role=role
      )
  
      res = client.add_endpoint_role(endpoint_id, role_doc)
      formatted_print(res, simple_text="ID: {}".format(res["id"]))
docs: Executor for `globus endpoint role show`