private FlowDefinition getFlowDefinition(TuningInput tuningInput) {
    FlowDefinition flowDefinition =
        FlowDefinition.find.where().eq(FlowDefinition.TABLE.flowDefId, tuningInput.getFlowDefId()).findUnique();
    if (flowDefinition == null) {
      flowDefinition = new FlowDefinition();
      flowDefinition.flowDefId = tuningInput.getFlowDefId();
      flowDefinition.flowDefUrl = tuningInput.getFlowDefUrl();
      flowDefinition.save();
    }
    return flowDefinition;
  }
Returns flow definition corresponding to the given tuning input if it exists, else creates one and returns it
@param tuningInput TuningInput containing the flow definition id corresponding to which flow definition
                   is to be returned
@return FlowDefinition flow definition
app/com/linkedin/drelephant/tuning/AutoTuningAPIHelper.java