code: function getDependency(dependency) {
              if (dependency) {
                  return angular.isString(dependency) ? $injector.get(dependency) : dependency;
              }
  
              return undefined;
          }
docs: Allow dependencies to be referenced by name or instance.  If referenced by name AngularJS $injector
  is used to retrieve the dependency.
  
  @param dependency (string | function) The dependency to retrieve
  @returns {*} The dependency