code: def get_func(func, aliasing, implementations):
      
      try:
          func_str = aliasing[func]
      except KeyError:
          if callable(func):
              return func
      else:
          if func_str in implementations:
              return func_str
          if func_str.startswith('nan') and \
                  func_str[3:] in funcs_no_separate_nan:
              raise ValueError("%s does not have a nan-version".format(func_str[3:]))
          else:
              raise NotImplementedError("No such function available")
      raise ValueError("func %s is neither a valid function string nor a "
                       "callable object".format(func))
docs: Return the key of a found implementation or the func itself