code: def from_instance_count(cls, instance_count_arg, entrypoint="*"):
          
          try:
              if instance_count_arg is None:
                  return cls(None)
              if isinstance(instance_count_arg, basestring) or isinstance(instance_count_arg, int):
                  return cls({entrypoint: {"clusterSpec": {"initialInstanceCount": int(instance_count_arg)}}})
              if isinstance(instance_count_arg, dict):
                  return cls({k: {"clusterSpec": {"initialInstanceCount": int(v)}} for k, v in instance_count_arg.items()})
              raise ValueError
          except ValueError:
              DXError('Expected instance_count field to be either an int, string or a dict')
docs: Returns a SystemRequirementsDict that can be passed as a
          "systemRequirements" input to job/new or run/ API calls.
          The instance_count_arg should be either a:
          * string or int eg. "6" or 8
          * dictionary, eg. {"main": 4, "other_function": 2}