code: public SDVariable gather(String name, SDVariable df, SDVariable indices, int axis) {
          SDVariable ret = f().gather(df, indices, axis);
          return updateVariableNameAndReference(ret, name);
      }
docs: Gather slices from the input variable where the indices are specified as dynamic SDVariable values.<br>
  Output shape is same as input shape, except for axis dimension, which has size equal to indices.length.
  
  @param name    name of the output variable
  @param df      Input variable
  @param indices Indices to get slices for. Rank 0 or 1 input
  @param axis    Axis that the indices refer to
  @return Output variable with slices pulled from the specified axis